lilei il y a 4 ans
Parent
commit
3efb6feffd
1 fichiers modifiés avec 7 ajouts et 1 suppressions
  1. 7 1
      pages/ledouHexiao/ledouHexiao.vue

+ 7 - 1
pages/ledouHexiao/ledouHexiao.vue

@@ -69,6 +69,7 @@
 				isDisable: false,  //  是否禁止获取验证码
 				code: '',
 				loading: false,
+				currentGold: 0,
 				form:{
 					storeName: '',
 					customerMobile: '',
@@ -98,6 +99,7 @@
 		onLoad(opts) {
 			let data = JSON.parse(decodeURIComponent(opts.item))
 			let user = this.$store.state.vuex_userData
+			this.currentGold = data.currentGold
 			this.form.customerMobile = data.mobile
 			this.form.storeName = user.org.name
 		},
@@ -112,7 +114,11 @@
 					if (valid) {
 						console.log('验证通过');
 						if(this.form.changeNum>0){
-							this.showModal = true
+							if(this.form.changeNum <= this.currentGold){
+								this.showModal = true
+							}else{
+								uni.showToast({icon: 'none',title: '乐豆余额不足'}) 
+							}
 						}else{
 							uni.showToast({icon: 'none',title: '请输入乐豆'}) 
 						}