|
@@ -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: '请输入乐豆'})
|
|
|
}
|