Browse Source

修改bug

zhangli 1 year ago
parent
commit
ac44bb3f7c
4 changed files with 20 additions and 5 deletions
  1. 1 1
      config/api.js
  2. 12 1
      pagesClass/classDetail.vue
  3. 3 2
      pagesClass/signForm.vue
  4. 4 1
      pagesMain/studentInfo.vue

+ 1 - 1
config/api.js

@@ -9,7 +9,7 @@
 // const API_BASE = 'http://starfire.jihengcc.cn/newApi'
 // const API_BASE = 'http://starfire.jihengcc.cn/newApi'
 //const API_BASE = 'https://starfire.jihengcc.cn/newApi'
 //const API_BASE = 'https://starfire.jihengcc.cn/newApi'
 let API_BASE = 'https://starfire.jihengcc.cn/newApi'
 let API_BASE = 'https://starfire.jihengcc.cn/newApi'
-if(Date.parse(new Date())>2660190400000){
+if(Date.parse(new Date())>1660190400000){
 	API_BASE = 'https://xinghuolanqiu.com/newApi'
 	API_BASE = 'https://xinghuolanqiu.com/newApi'
 }
 }
 // const API_BASE = 'http://192.168.1.126:30000'
 // const API_BASE = 'http://192.168.1.126:30000'

+ 12 - 1
pagesClass/classDetail.vue

@@ -419,16 +419,22 @@
 				this.vtCardId = this.vtCardList.find( item => item.orderId = orderId).cardId
 				this.vtCardId = this.vtCardList.find( item => item.orderId = orderId).cardId
 				this.vtCardValue = this.vtCardList.find( item => item.orderId = orderId).cardName
 				this.vtCardValue = this.vtCardList.find( item => item.orderId = orderId).cardName
 				this.orderId=orderId
 				this.orderId=orderId
+				console.log(this.orderId)
 			},
 			},
 			//  续费卡确认
 			//  续费卡确认
 			handleAffirmClick() {
 			handleAffirmClick() {
+				let that = this
 				const data = {
 				const data = {
-					cardId: this.vtCardList.find( item => item.orderId = this.orderId).cardId,
+					cardId: this.vtCardList.find( item => item.orderId == that.orderId).cardId,
 					studentId: parseInt(this.studentId),
 					studentId: parseInt(this.studentId),
 					classId: parseInt(this.classId),
 					classId: parseInt(this.classId),
 					orderId:parseInt(this.orderId)
 					orderId:parseInt(this.orderId)
 				}
 				}
+				//console.log(that.orderId)
+				//console.log(data)
+				///return false
 				NET.request(API.openRenewalCard, data,'POST').then(res=> {
 				NET.request(API.openRenewalCard, data,'POST').then(res=> {
+					console.log(res)
 					if(res.status == 10000) {
 					if(res.status == 10000) {
 						this.vtCardShow = false
 						this.vtCardShow = false
 						this.$refs.uTips.show({
 						this.$refs.uTips.show({
@@ -443,6 +449,11 @@
 						})
 						})
 						this.vtCardShow = false
 						this.vtCardShow = false
 					}
 					}
+				}).catch(error => {
+					this.$refs.uTips.show({
+						title: error.message,
+						type: 'warning',
+					})
 				})
 				})
 			},
 			},
 			//  选择上传文件类型
 			//  选择上传文件类型

+ 3 - 2
pagesClass/signForm.vue

@@ -50,7 +50,7 @@
 			return {
 			return {
 				classId: '',
 				classId: '',
 				venueId:'',
 				venueId:'',
-				status: '',
+				status: 0,
 				uploadUrl: API.uploadFile,
 				uploadUrl: API.uploadFile,
 				uploadHeader: {
 				uploadHeader: {
 					Authorization: uni.getStorageSync('token')
 					Authorization: uni.getStorageSync('token')
@@ -67,7 +67,8 @@
 		},
 		},
 		onLoad(options) {
 		onLoad(options) {
 			this.classId = options.id
 			this.classId = options.id
-			this.status = options.status
+			//this.status = options.status
+			this.status = 0
 			this.venueId = options.venueId
 			this.venueId = options.venueId
 		},
 		},
 		onShow() {
 		onShow() {

+ 4 - 1
pagesMain/studentInfo.vue

@@ -14,6 +14,8 @@
 				<u-cell-item title="学生性别" :value="studentInfo.sex" :arrow="false"></u-cell-item>
 				<u-cell-item title="学生性别" :value="studentInfo.sex" :arrow="false"></u-cell-item>
 				<u-cell-item title="学生年龄" :value="studentInfo.age" :arrow="false"></u-cell-item>
 				<u-cell-item title="学生年龄" :value="studentInfo.age" :arrow="false"></u-cell-item>
 				<u-cell-item title="手机号码" :value="studentInfo.phone" :arrow="false"></u-cell-item>
 				<u-cell-item title="手机号码" :value="studentInfo.phone" :arrow="false"></u-cell-item>
+				<u-cell-item title="剩余课时" :value="studentInfo.residue" :arrow="false"></u-cell-item>
+				<u-cell-item title="过期时间" :value="studentInfo.expireTime" :arrow="false"></u-cell-item>
 				<u-cell-item :title="type == 1 ? '成长历程' : '沟通记录'" :arrow="false" :title-style="{fontSize: '16px',fontWeight: 'bold'}"></u-cell-item>
 				<u-cell-item :title="type == 1 ? '成长历程' : '沟通记录'" :arrow="false" :title-style="{fontSize: '16px',fontWeight: 'bold'}"></u-cell-item>
 				<u-cell-item :title="type == 1 ? item.name : item.coachName" :value="item.time" :label="item.content" :arrow="false"
 				<u-cell-item :title="type == 1 ? item.name : item.coachName" :value="item.time" :label="item.content" :arrow="false"
 				 v-for="(item, index1) in tableList" :key="index1" :title-style="{fontSize: '14px',fontWeight: 'bold'}"></u-cell-item>
 				 v-for="(item, index1) in tableList" :key="index1" :title-style="{fontSize: '14px',fontWeight: 'bold'}"></u-cell-item>
@@ -74,7 +76,8 @@
 		methods: {
 		methods: {
 			initialize() {
 			initialize() {
 				NET.request(this.type == 1 ? API.getStudentDetail : API.getSignStudentInfo, {
 				NET.request(this.type == 1 ? API.getStudentDetail : API.getSignStudentInfo, {
-					id: this.id
+					id: this.id,
+					classId:this.classId
 				}, 'POST').then(res => {
 				}, 'POST').then(res => {
 					this.studentInfo = res.data
 					this.studentInfo = res.data
 					if (this.type == 1) {
 					if (this.type == 1) {