Kaynağa Gözat

修改【用户-扫描核销】输入支付数量大于用户乐豆余额,在输入支付密码后才校验

1004749546@qq.com 4 yıl önce
ebeveyn
işleme
6e63a0bf4b
1 değiştirilmiş dosya ile 11 ekleme ve 1 silme
  1. 11 1
      pages/checkOut/checkOut.vue

+ 11 - 1
pages/checkOut/checkOut.vue

@@ -92,10 +92,13 @@
 				number: '',  // 支付数量
 				showPayModal: false, // 支付弹窗
 				password: '', // 支付密码
-				partnerNo: '' // 销售商编号
+				partnerNo: '', // 销售商编号
+				currentGold: 0 //用户当前拥有乐豆数
 			}
 		},
 		onLoad(opts) {
+			this.currentGold = this.$store.state.vuex_userData.currentGold
+			console.log(this.currentGold,'currentGold')
 			console.log(opts)
 			this.partnerNo = opts.scene
 			// 查询销售商信息
@@ -120,6 +123,13 @@
 						icon: 'none'
 					})
 				} else {
+					if (this.number>this.currentGold) {
+						uni.showToast({
+							title: '您当前余额不足!',
+							icon: 'none'
+						})
+						return false
+					}
 					existPayPwd().then(res => {
 						console.log(res,'rrrrrr')
 						if(res.status == 200) {