优惠券相关更新

This commit is contained in:
GaoHao
2024-11-21 16:27:32 +08:00
parent 76a80729c8
commit 151562d5e6
10 changed files with 234 additions and 138 deletions

View File

@@ -18,7 +18,7 @@
</view>
</view>
</view>
<u-radio activeColor="#E8AD7B" :disabled="freeCheck&&index==0" icon-size="36" size="36" :name="item.type">
<u-radio activeColor="#E8AD7B" :disabled="(freeCheck&&index==0) || (index!=0&&payAmount<=0) || (rechargeFreeChecked&&index==0)" icon-size="36" size="36" :name="item.type">
</u-radio>
</view>
@@ -55,6 +55,12 @@
}
},
props:{
rechargeFreeChecked:{
type: Boolean
},
payAmount:{
type: Number
},
amountVIP:{
type: Object
},
@@ -77,6 +83,31 @@
// this.$emit("groupChange",{type:this.radiovalue ,name: name })
// }
// }
payAmount:{
immediate: true,
handler (newVal) {
if ( newVal <= 0 ) {
this.radiovalue = 1
let name = this.paymentMethodName[this.radiovalue-1].name;
this.$emit("groupChange",{type:this.radiovalue ,name: name })
}
}
},
rechargeFreeChecked:{
immediate: true,
handler (newVal) {
if ( newVal ) {
// #ifdef MP-WEIXIN
this.radiovalue = 2
// #endif
// #ifdef MP-ALIPAY
this.radiovalue = 3
// #endif
let name = this.paymentMethodName[this.radiovalue-1].name;
this.$emit("groupChange",{type:this.radiovalue ,name: name })
}
}
},
freeCheck:{
immediate: true,
handler (newVal) {
@@ -88,14 +119,13 @@
this.radiovalue = 3
// #endif
let name = this.paymentMethodName[this.radiovalue-1].name;
console.log({type:this.radiovalue ,name: name })
this.$emit("groupChange",{type:this.radiovalue ,name: name })
}
}
},
},
mounted() {
console.log(this.amountVIP)
// console.log(this.amountVIP)
// this.getAount();
},
@@ -105,10 +135,12 @@
* @param {Object}
*/
groupChange(type) {
console.log(type)
if ( this.freeCheck && type == 1 ) {
return;
}
if ( this.payAmount<=0 && type != 1 ) {
return;
}
this.radiovalue = type;
let name = this.paymentMethodName[type-1].name;
this.$emit("groupChange",{type:type ,name: name })