mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-08-06 19:07:23 +08:00
refactor: 优化促销商品列表和电子卡券逻辑
- 更新促销商品列表组件,简化商品详情页跳转逻辑 - 移除不必要的礼品卡相关状态管理,确保电子卡券逻辑的清晰性 - 调整 utils/goodsType.js 中的卡密处理函数,专注于当前订单的卡密履约行 - 优化订单详情页的卡密展示逻辑,确保信息准确性
This commit is contained in:
@@ -312,19 +312,16 @@ const cancelList = ref<any[]>([])
|
||||
const rogShow = ref(false)
|
||||
const reason = ref('')
|
||||
const orderPackage = ref<any>('')
|
||||
const giftECouponOrders = ref<any[]>([])
|
||||
|
||||
// orderType=E_COUPON:无物流/核销码,卡密见 cardKeyDetail(API-B-01 orderItems[].cardKeys)
|
||||
// orderType=E_COUPON:无物流/核销码;卡密见 cardKeyDetail(仅本单 orderItems,不含满赠子单)
|
||||
const isECouponOrder = computed(() => checkECouponOrder(order.value?.orderType))
|
||||
const isNonPhysicalOrder = computed(() => checkNonPhysicalOrder(order.value?.orderType))
|
||||
const ecouponCardKeyDelivered = computed(() =>
|
||||
orderHasCardKeyContent(orderGoodsList.value, giftECouponOrders.value)
|
||||
orderHasCardKeyContent(orderGoodsList.value)
|
||||
)
|
||||
const ecouponPendingMessage = computed(() => {
|
||||
const pending = collectCardKeyFulfillLines(
|
||||
orderGoodsList.value,
|
||||
giftECouponOrders.value
|
||||
).find((line) => line.status !== CARD_KEY_FULFILL_STATUS.DELIVERED)
|
||||
const pending = collectCardKeyFulfillLines(orderGoodsList.value).find(
|
||||
(line) => line.status !== CARD_KEY_FULFILL_STATUS.DELIVERED
|
||||
)
|
||||
return pending ? resolveCardKeyFulfillMessage(pending) : ''
|
||||
})
|
||||
|
||||
@@ -412,7 +409,6 @@ function loadData(orderSnParam: string) {
|
||||
order.value = result.order
|
||||
orderGoodsList.value = result.orderItems
|
||||
orderDetail.value = result
|
||||
giftECouponOrders.value = result.giftECouponOrders || []
|
||||
if (
|
||||
result.order.deliveryMethod === 'LOGISTICS' &&
|
||||
!checkECouponOrder(result.order.orderType) &&
|
||||
|
||||
Reference in New Issue
Block a user