修复余额显示问题,增加未开启智慧充值禁用余额支付,修复自动删除未找到对应购物车问题

This commit is contained in:
2025-12-25 11:35:04 +08:00
parent edd10edf9f
commit 113193b142
7 changed files with 48 additions and 1697 deletions

View File

@@ -15,7 +15,7 @@
<view class="name"> {{ item.name }} </view>
<view class="method_list_bom" v-if="item.name == '余额支付'">
<text class="balance">
当前余额{{ orderVIP ? orderVIP.amount || 0 : 0 }}</text>
当前余额{{ shopUserInfo ? shopUserInfo.amount || 0 : 0 }}</text>
<text class="topUpNow" @click="goRecharge">去充值</text>
</view>
</view>
@@ -66,6 +66,14 @@ const props = defineProps({
type: Array,
default: () => [],
},
shopUserInfo:{
type: Object,
default: () => {
return{
amount:0
}
},
}
});
// 工具函数 - 深拷贝对象(切断引用)
@@ -77,15 +85,10 @@ function returnDisabled(item) {
return props.disablePayType.includes(item.name);
}
const orderVIP = ref(null);
const emits = defineEmits(["customevent", "groupChange"]);
watchEffect(() => {
orderVIP.value = uni.cache.get("orderVIP");
});
const orderVIPfun = (data) => {
orderVIP.value = data;
};
// 支付方式列表(保持不变)
const paymentMethodList = ref([
@@ -207,13 +210,12 @@ const goRecharge = () => {
return;
}
uni.navigateTo({
url: `/pages/user/member/czzx?shopId=${orderVIP.value?.shopId || ''}`,
url: `/pages/user/member/czzx?shopId=${props.shopUserInfo?.shopId || ''}`,
});
};
defineExpose({
groupChanges,
orderVIPfun,
});
</script>