UU币和优惠卷不能同时选中

This commit is contained in:
zpc 2025-04-11 00:05:14 +08:00
parent 0a16b6c107
commit e50f16419f
3 changed files with 1013 additions and 992 deletions

View File

@ -199,6 +199,14 @@ export default {
default: 1 default: 1
} }
}, },
watch: {
// // props
// couponData(val) {
// console.log('couponData',val);
// },
},
data() { data() {
//pageData.goods.type //pageData.goods.type
return { return {
@ -270,6 +278,8 @@ export default {
* @param {String} method 支付方式 * @param {String} method 支付方式
*/ */
changePayMethod(method) { changePayMethod(method) {
console.log('aaa');
if (this.is_deduction == 0) { if (this.is_deduction == 0) {
// //
let availablePayMethods = 0; let availablePayMethods = 0;
@ -285,19 +295,7 @@ export default {
this.$emit('change-pay', method); this.$emit('change-pay', method);
}, },
/**
* 检查按钮是否显示
*/
getBtnXianShi() {
if (this.pageData == null || this.pageData["xuangou"] == null) {
return true;
}
let xuangou = this.pageData["xuangou"];
if (xuangou.quanju_xiangou == 0) {
return true;
}
return false;
}
} }
} }
</script> </script>

File diff suppressed because it is too large Load Diff

View File

@ -169,7 +169,8 @@
<view class="log-list"> <view class="log-list">
<view class="log-item br10" v-for="(a, b) in logList" :key="b"> <view class="log-item br10" v-for="(a, b) in logList" :key="b">
<view class="avatar"> <view class="avatar">
<image :src="a.user_info && a.user_info.headimg" style="width:80rpx; height: 80rpx;"></image> <image :src="a.user_info && a.user_info.headimg" style="width:80rpx; height: 80rpx;">
</image>
</view> </view>
<view class="info"> <view class="info">
@ -747,6 +748,9 @@ export default {
if (type === 'useMoney') { if (type === 'useMoney') {
this.useMoney = !this.useMoney; this.useMoney = !this.useMoney;
} else if (type === 'useIntegral') { } else if (type === 'useIntegral') {
if (this.couponData!=null&&this.couponData.id!='') {
this.couponData = null;
}
this.useIntegral = !this.useIntegral; this.useIntegral = !this.useIntegral;
} else if (type === 'useMoney2') { } else if (type === 'useMoney2') {
this.useMoney2 = !this.useMoney2; this.useMoney2 = !this.useMoney2;
@ -781,8 +785,15 @@ export default {
} }
} }
this.buyNum = num this.buyNum = num;
let coupon_id = (this.couponData && this.couponData.id) || ''
if (coupon_id != '' && this.useIntegral) {
this.useIntegral = false;
} else if (this.useIntegral && coupon_id != '') {
this.couponData = null;
coupon_id = '';
}
this.req({ this.req({
url, url,
data: { data: {
@ -791,7 +802,7 @@ export default {
use_money_is: this.useMoney ? 1 : 2, use_money_is: this.useMoney ? 1 : 2,
use_integral_is: this.useIntegral ? 1 : 2, use_integral_is: this.useIntegral ? 1 : 2,
use_money2_is: this.useMoney2 ? 1 : 2, use_money2_is: this.useMoney2 ? 1 : 2,
coupon_id: (this.couponData && this.couponData.id) || '', coupon_id: coupon_id,
// ad_id: uni.getStorageSync('_ad_id') // ad_id: uni.getStorageSync('_ad_id')
}, },