diff --git a/common/css/common.scss b/common/css/common.scss index 349114d..b6959e6 100644 --- a/common/css/common.scss +++ b/common/css/common.scss @@ -94,4 +94,7 @@ page, } .u-col-center{ align-items: center; + } + .justify-between{ + justify-content: space-between; } \ No newline at end of file diff --git a/components/coupon-modal.vue b/components/coupon-modal.vue index b39b165..c290f44 100644 --- a/components/coupon-modal.vue +++ b/components/coupon-modal.vue @@ -159,7 +159,7 @@ async function getHandle() { const res = await receivePopUp({ getMode: props.getMode }); - show.value = false; + close() uni.showToast({ title: '已领取,请在我的优惠券中查看', icon: 'none' diff --git a/components/drainage.vue b/components/drainage.vue index 2dbc572..297888b 100644 --- a/components/drainage.vue +++ b/components/drainage.vue @@ -60,7 +60,7 @@ function close() { emit("close"); } const drainageConfig = ref({}); -onMounted(async () => { +async function getDrainageConfig() { const shopId = uni.cache.get("shopId"); const drainageConfigRes = await drainageConfigApi.config({ shopId: shopId, @@ -71,7 +71,18 @@ onMounted(async () => { } else { close(); } -}); +} +// onMounted(() => { +// getDrainageConfig(); +// }); +watch( + () => showPreview.value, + (newVal) => { + if (newVal) { + getDrainageConfig(); + } + } +); \ No newline at end of file diff --git a/components/payPassword.vue b/components/payPassword.vue index 0bde54c..9098732 100644 --- a/components/payPassword.vue +++ b/components/payPassword.vue @@ -48,6 +48,7 @@ password.value += num; } if (password.value.length === 6) { + console.log('密码输入完成:', password.value); emits('inputComplete', password.value); password.value = '' } @@ -56,7 +57,7 @@ // 关闭模态框 const closeModal = () => { emits('close'); - password = ''; + password.value = ''; }; // 将方法暴露给父组件 defineExpose({ diff --git a/components/paymentMethod.vue b/components/paymentMethod.vue index 6d26361..e9ea361 100644 --- a/components/paymentMethod.vue +++ b/components/paymentMethod.vue @@ -4,7 +4,7 @@ 支付方式 { + return { + name: "微信支付", + type: 2, + url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/weChat.png", + payType: "wechatPay", + }; + }, +}); -const ispws = ref(false); // 输入支付密码 +watch( + () => props.disablePayType, + (newval) => { + console.log('禁止支付方式', newval); -const storeInfo = ref({}); + const canUsePayType = paymentMethodList.value.filter((item) => { + return !newval.includes(item.name); + }); + console.log('可用支付方式', canUsePayType); + if (canUsePayType.find((v) => v.type == radiovalue.value.type)) { + return; + } + radiovalue.value = canUsePayType[0]; + }, + { + immediate: true, + } +); // * 监听支付方式切换 const groupChanges = (type) => { @@ -158,8 +184,6 @@ const groupChanges = (type) => { return; } const item = paymentMethodList.value.find((v) => v.type == type); - console.log("groupChanges", item); - console.log("props.disablePayType", props.disablePayType); if (item && returnDisabled(item)) { uni.showToast({ @@ -171,9 +195,7 @@ const groupChanges = (type) => { // if (props.payAmount <= 0 && type != 1) { // return; // } - radiovalue.value = type; - let name = paymentMethodName.value[type - 1].name; - console.log('emit:groupChange',paymentMethodName.value[type - 1]); + radiovalue.value = item; emits("groupChange", paymentMethodName.value[type - 1]); }; @@ -182,15 +204,18 @@ const goRecharge = () => { if (props.disablePayType.includes("余额支付")) { return; } - if (orderVIP.value.isVip) { - uni.navigateTo({ - url: "/pages/user/member/czzx?shopId=" + orderVIP.value.shopId, - }); - return; - } uni.navigateTo({ - url: "/user/vip/buy-vip?shopId=" + orderVIP.value.shopId, + url: "/pages/user/member/czzx?shopId=" + orderVIP.value.shopId, }); + // if (orderVIP.value.isVip) { + // uni.navigateTo({ + // url: "/pages/user/member/czzx?shopId=" + orderVIP.value.shopId, + // }); + // return; + // } + // uni.navigateTo({ + // url: "/user/vip/buy-vip?shopId=" + orderVIP.value.shopId, + // }); // uni.pro.navigateTo('user/member/index', { // shopId: orderVIP.value.shopId diff --git a/components/wechat-ac-qrcode.vue b/components/wechat-ac-qrcode.vue new file mode 100644 index 0000000..0f9ab45 --- /dev/null +++ b/components/wechat-ac-qrcode.vue @@ -0,0 +1,41 @@ + + + + + \ No newline at end of file diff --git a/pages/order/components/orderInfo.vue b/pages/order/components/orderInfo.vue index 5596039..37ad662 100644 --- a/pages/order/components/orderInfo.vue +++ b/pages/order/components/orderInfo.vue @@ -201,7 +201,7 @@ > {{ item.name }} -