pull/100/head
岳琳红 2024-09-11 14:27:41 +08:00
parent dadc05da61
commit 59dc4beeeb
2 changed files with 5 additions and 3 deletions

2
.env
View File

@ -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

View File

@ -106,11 +106,11 @@
</text>
<text
class="item-value"
:class="state.couponInfo.length > 0 ? 'text-red' : 'text-disabled'"
:class="couponNumber > 0 ? 'text-red' : 'text-disabled'"
v-else
>
{{
state.couponInfo.length > 0 ? state.couponInfo.length + ' 张可用' : '暂无可用优惠券'
couponNumber > 0 ? couponNumber + ' 张可用' : '暂无可用优惠券'
}}
</text>
<text class="_icon-forward item-icon" />
@ -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;
}
}