问题修复,下单修复

This commit is contained in:
2025-09-29 16:54:35 +08:00
parent 719a513371
commit afa769579a
16 changed files with 417 additions and 167 deletions

View File

@@ -6,7 +6,7 @@
<up-radio-group v-model="radiovalue" iconPlacement="right" @change="groupChanges" :size="28"
placement="column">
<block v-for="(item,index) in paymentMethodList" :key="index">
<view class="method_list" @click="groupChanges(item.type)"
<view class="method_list" @click="groupChanges(item.type)" :class="{disabled:returnDisabled(item)}"
v-if="(index+1) == radiovalue?!changeFreeenable:true">
<view class="method_list_top">
<view class="method_list_top_left">
@@ -14,10 +14,9 @@
<view class="method_list_top_cen">
<view class="name"> {{ item.name }} </view>
<view class="method_list_bom" v-if="item.type == 1">
<text class="balance" v-if="orderVIP.isVip == 1">
会员卡余额{{orderVIP?orderVIP.amount:0}}</text>
<text class="topUpNow"
@click="goRecharge">{{orderVIP.isVip == 0?'注册会员':'去充值'}}</text>
<text class="balance">
当前余额{{orderVIP?orderVIP.amount:0}}</text>
<text class="topUpNow" @click="goRecharge">去充值</text>
</view>
</view>
</view>
@@ -59,11 +58,24 @@
changeFreeenable: {
type: Boolean,
default: false
},
disablePayType: {
type: Array,
default: () => {
return []
}
}
});
function returnDisabled(item) {
if (props.disablePayType.includes(item.name)) {
return true
}else{
return false
}
}
const orderVIP = ref(null)
const emits = defineEmits(['customevent', 'groupChange']);
watchEffect(() => {
@@ -131,6 +143,13 @@
if (props.freeCheck && type == 1) {
return;
}
const item=paymentMethodList.value.find(v=>v.type==type)
if(item&&returnDisabled(item)){
return uni.showToast({
title:"当前支付方式不可用",
icon:'none'
})
}
// if (props.payAmount <= 0 && type != 1) {
// return;
// }
@@ -142,16 +161,16 @@
// 去充值
const goRecharge = () => {
if(orderVIP.value.isVip){
if (orderVIP.value.isVip) {
uni.navigateTo({
url:'/pages/user/member/czzx?shopId='+orderVIP.value.shopId
url: '/pages/user/member/czzx?shopId=' + orderVIP.value.shopId
})
return
return
}
uni.navigateTo({
url:'/user/vip/buy-vip?shopId='+orderVIP.value.shopId
url: '/user/vip/buy-vip?shopId=' + orderVIP.value.shopId
})
// uni.pro.navigateTo('user/member/index', {
// shopId: orderVIP.value.shopId
// })
@@ -185,7 +204,9 @@
.method_list {
padding: 40rpx 0;
box-sizing: border-box;
&.disabled{
opacity: .6;
}
.method_list_top {
display: flex;
justify-content: space-between;