zhangli hace 1 año
padre
commit
ac44bb3f7c
Se han modificado 4 ficheros con 20 adiciones y 5 borrados
  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 = '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'
 }
 // 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.vtCardValue = this.vtCardList.find( item => item.orderId = orderId).cardName
 				this.orderId=orderId
+				console.log(this.orderId)
 			},
 			//  续费卡确认
 			handleAffirmClick() {
+				let that = this
 				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),
 					classId: parseInt(this.classId),
 					orderId:parseInt(this.orderId)
 				}
+				//console.log(that.orderId)
+				//console.log(data)
+				///return false
 				NET.request(API.openRenewalCard, data,'POST').then(res=> {
+					console.log(res)
 					if(res.status == 10000) {
 						this.vtCardShow = false
 						this.$refs.uTips.show({
@@ -443,6 +449,11 @@
 						})
 						this.vtCardShow = false
 					}
+				}).catch(error => {
+					this.$refs.uTips.show({
+						title: error.message,
+						type: 'warning',
+					})
 				})
 			},
 			//  选择上传文件类型

+ 3 - 2
pagesClass/signForm.vue

@@ -50,7 +50,7 @@
 			return {
 				classId: '',
 				venueId:'',
-				status: '',
+				status: 0,
 				uploadUrl: API.uploadFile,
 				uploadHeader: {
 					Authorization: uni.getStorageSync('token')
@@ -67,7 +67,8 @@
 		},
 		onLoad(options) {
 			this.classId = options.id
-			this.status = options.status
+			//this.status = options.status
+			this.status = 0
 			this.venueId = options.venueId
 		},
 		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.age" :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 ? 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>
@@ -74,7 +76,8 @@
 		methods: {
 			initialize() {
 				NET.request(this.type == 1 ? API.getStudentDetail : API.getSignStudentInfo, {
-					id: this.id
+					id: this.id,
+					classId:this.classId
 				}, 'POST').then(res => {
 					this.studentInfo = res.data
 					if (this.type == 1) {