From 59dc4beeeb8fbc0759e256e6a12a5fd1e1eff2e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B2=B3=E7=90=B3=E7=BA=A2?= <1921957171@qq.com> Date: Wed, 11 Sep 2024 14:27:41 +0800 Subject: [PATCH] add --- .env | 2 +- pages/order/confirm.vue | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.env b/.env index 82a8b46f..f0d0b955 100644 --- a/.env +++ b/.env @@ -18,7 +18,7 @@ SHOPRO_WEBSOCKET_PATH = /infra/ws SHOPRO_DEV_PORT = 48080 # 客户端静态资源地址 空=默认使用服务端指定的CDN资源地址前缀 | local=本地 | http(s)://xxx.xxx=自定义静态资源地址前缀SHOPRO_STATIC_URL = https://file.sheepjs.com -SHOPRO_STATIC_URL = http://192.168.10.207 +SHOPRO_STATIC_URL = http://192.168.10.207:19000 # 是否开启直播 1 开启直播 | 0 关闭直播 (小程序官方后台未审核开通直播权限时请勿开启) SHOPRO_MPLIVE_ON = 0 diff --git a/pages/order/confirm.vue b/pages/order/confirm.vue index ac5cee68..4f01bcb8 100644 --- a/pages/order/confirm.vue +++ b/pages/order/confirm.vue @@ -106,11 +106,11 @@ {{ - state.couponInfo.length > 0 ? state.couponInfo.length + ' 张可用' : '暂无可用优惠券' + couponNumber > 0 ? couponNumber + ' 张可用' : '暂无可用优惠券' }} @@ -314,6 +314,7 @@ } // 获取可用优惠券 + let couponNumber = ref(0) async function getCoupons() { const { code, data } = await CouponApi.getMatchCouponList( state.orderInfo.price.payPrice, @@ -323,6 +324,7 @@ ); if (code === 0) { state.couponInfo = data; + couponNumber.value = state.couponInfo.filter(item => item.match).length; } }