diff --git a/pages/order/confirm.vue b/pages/order/confirm.vue
index b18df4f7..6c49bb1e 100644
--- a/pages/order/confirm.vue
+++ b/pages/order/confirm.vue
@@ -52,25 +52,38 @@
class="score-img"
/>
- {{ state.pointStatus ? state.orderInfo.totalPoint - state.orderInfo.usePoint : (state.orderInfo.totalPoint || 0) }}
+ {{
+ state.pointStatus
+ ? state.orderInfo.totalPoint - state.orderInfo.usePoint
+ : state.orderInfo.totalPoint || 0
+ }}
-
+
-
+
运费
+¥{{ fen2yuan(state.orderInfo.price.deliveryPrice) }}
- 免运费
+ 免运费
-
+
联系人
-
+
联系电话
item.spuId),
- state.orderPayload.items.map((item) => item.skuId),
- state.orderPayload.items.map((item) => item.categoryId),
- );
- if (code === 0) {
- state.couponInfo = data;
- }
- }
-
onLoad(async (options) => {
if (!options.data) {
sheep.$helper.toast('参数不正确,请检查!');
@@ -334,13 +337,15 @@
}
state.orderPayload = JSON.parse(options.data);
await getOrderInfo();
- await getCoupons();
});
// 使用 watch 监听地址和配送方式的变化
watch(addressState, async (newAddress, oldAddress) => {
// 如果收货地址或配送方式有变化,则重新计算价格
- if (newAddress.addressInfo.id !== oldAddress.addressInfo.id || newAddress.deliveryType !== oldAddress.deliveryType) {
+ if (
+ newAddress.addressInfo.id !== oldAddress.addressInfo.id ||
+ newAddress.deliveryType !== oldAddress.deliveryType
+ ) {
await getOrderInfo();
}
});
diff --git a/sheep/api/promotion/coupon.js b/sheep/api/promotion/coupon.js
index c9dfa524..f0382ee0 100644
--- a/sheep/api/promotion/coupon.js
+++ b/sheep/api/promotion/coupon.js
@@ -79,23 +79,6 @@ const CouponApi = {
},
});
},
- // 获得匹配指定商品的优惠劵列表
- getMatchCouponList: (price, spuIds, skuIds, categoryIds) => {
- return request({
- url: '/promotion/coupon/match-list',
- method: 'GET',
- params: {
- price,
- spuIds: spuIds.join(','),
- skuIds: skuIds.join(','),
- categoryIds: categoryIds.join(','),
- },
- custom: {
- showError: false,
- showLoading: false, // 避免影响 settlementOrder 结算的结果
- },
- });
- }
};
export default CouponApi;
diff --git a/sheep/components/s-coupon-list/s-coupon-list.vue b/sheep/components/s-coupon-list/s-coupon-list.vue
index 411a4c0e..1c76e701 100644
--- a/sheep/components/s-coupon-list/s-coupon-list.vue
+++ b/sheep/components/s-coupon-list/s-coupon-list.vue
@@ -37,30 +37,22 @@
有效期:领取后 {{ data.fixedEndTerm }} 天内可用
-
+
有效期: {{ sheep.$helper.timeFormat(data.validStartTime, 'yyyy-mm-dd') }} 至
{{ sheep.$helper.timeFormat(data.validEndTime, 'yyyy-mm-dd') }}
-
+
满 {{ fen2yuan(data.usePrice) }} 可用
-
{{ data.description }}
@@ -76,12 +68,10 @@