Browse Source

Signed-off-by: liuboyan <632697560@qq.com>
学员选择刷新会员卡信息

liuboyan 4 years ago
parent
commit
2485c4fc0a
1 changed files with 10 additions and 4 deletions
  1. 10 4
      pagesMain/openMember.vue

+ 10 - 4
pagesMain/openMember.vue

@@ -120,15 +120,16 @@
 					})
 				})
 			},
-			//  选择优惠券
-			selectCoupon(item) {
-				this.couponId = item.id
+			//  更新数据
+			refreshMemberInfo() {
 				NET.request(API.getMemberCardInfoAfterCoupon, {
 					memberId: this.memberCardId,
 					couponId: this.couponId
+					studentId: this.studentId
 				}, 'POST').then(res => {
 					this.memberInfo = res.data
 					this.couponShow = false
+					this.studentShow = false
 				}).catch(error => {
 					this.$refs.uTips.show({
 						title: error.message,
@@ -136,11 +137,16 @@
 					})
 				})
 			},
+			//  选择优惠券
+			selectCoupon(item) {
+				this.couponId = item.id
+				this.refreshMemberInfo()
+			},
 			//  选择学员
 			selectStudent(item) {
 				this.studentId = item.studentId
 				this.studentName = item.studentName
-				this.studentShow = false
+				this.refreshMemberInfo()
 			},
 			//  支付
 			toPay() {