diff --git a/components/coupon/coupon-icon.vue b/components/coupon/coupon-icon.vue index 61e3d50..d8f31bd 100644 --- a/components/coupon/coupon-icon.vue +++ b/components/coupon/coupon-icon.vue @@ -21,7 +21,7 @@ - {{ props.item.discountRate }}折 + {{ props.item.discountRate/10 }}折 满{{ props.item.fullAmount }}可用 diff --git a/components/coupon/list.vue b/components/coupon/list.vue index 7335c4c..b2255d2 100644 --- a/components/coupon/list.vue +++ b/components/coupon/list.vue @@ -12,7 +12,7 @@ - + diff --git a/components/paymentMethod.vue b/components/paymentMethod.vue index 8b792d6..bfe6202 100644 --- a/components/paymentMethod.vue +++ b/components/paymentMethod.vue @@ -6,7 +6,7 @@ - @@ -14,10 +14,9 @@ {{ item.name }} - - 会员卡余额¥{{orderVIP?orderVIP.amount:0}} - {{orderVIP.isVip == 0?'注册会员':'去充值'}} + + 当前余额¥{{orderVIP?orderVIP.amount:0}} + 去充值 @@ -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; diff --git a/pages/index/index.vue b/pages/index/index.vue index 98ca706..bc39b1e 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -327,6 +327,7 @@ onShow(async () => { uni.getLocation({ type: 'wgs84', success: async (res) => { + console.log('getLocation',res); let successres = await APIgeocodelocation({ lng: res.longitude, lat: res.latitude @@ -344,29 +345,15 @@ onShow(async () => { // 登录 proxy.$isResolve(); } + }, + fail(error) { + console.error('获取经纬度失败',error); } }); indexsRef.value.getVipConfig(); } catch (error) { - try { - let successres = await APIgeocodelocation({ - lng: '', - lat: '' - }); - if (successres) { - let datastorage = { - country: successres.addressComponent.country, // "中国" - province: successres.addressComponent.province, //province: "陕西省" - address: successres.addressComponent.city, //district: "西安市" - district: successres.addressComponent.district, //district: "未央区" - lng: res.longitude, - lat: res.latitude - }; - uni.cache.set('getLocationstorage', datastorage); - proxy.$isResolve(); - } - } catch (error) {} + } await proxy.$onLaunched; if (uni.cache.get('shopId')) { diff --git a/pages/order/components/charge.vue b/pages/order/components/charge.vue index 0210ef2..5ae661f 100644 --- a/pages/order/components/charge.vue +++ b/pages/order/components/charge.vue @@ -21,8 +21,8 @@ - {{item.rewardPoints}} + 积分 diff --git a/pages/order/components/orderInfo.vue b/pages/order/components/orderInfo.vue index 5530e65..031c310 100644 --- a/pages/order/components/orderInfo.vue +++ b/pages/order/components/orderInfo.vue @@ -117,7 +117,8 @@ v-if="item.icon" :src="item.icon" mode=""> {{ item.name }} - + 「可用积分{{pointsRes.accountPoints}},最大可抵扣{{maxPointDiscount}}元」 @@ -126,8 +127,17 @@ - -¥{{returnCouponDiscount}} + + + + + @@ -142,14 +152,17 @@ - - - -¥{{cartStore.orderCostSummary.pointDeductionAmount}} - + + + - 使用抵扣 + 使用抵扣 + + + + 订单备注: + + + + + + - + + :disablePayType="disablePayType" :changeFreeenable="isBwc" v-if="listinfo.status == 'unpaid'||!listinfo.id"> 实付金额: - + + ¥{{rechargeItem.amount}} + + ¥{{cartStore.orderCostSummary.finalPayAmount}} @@ -77,6 +93,12 @@ 加菜 + + + 取消订单 + +