mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-08-06 10:57:25 +08:00
feat: 添加电子卡券功能及相关逻辑
- 在 pages.json 中新增卡密详情页面路径 - 在多个组件中实现电子卡券(E_COUPON)逻辑,包括库存管理、结算页面处理、订单详情展示等 - 优化商品页面和订单页面以支持电子卡券的特性,隐藏不适用的功能 - 新增 utils/goodsType.js 文件,集中管理与电子卡券相关的类型和工具函数 - 更新样式以适应电子卡券的展示需求
This commit is contained in:
@@ -63,6 +63,8 @@ import { onLoad } from '@dcloudio/uni-app'
|
||||
import { unitPrice, parseGoodsImageUrl } from '@/utils/filters.js'
|
||||
import { getAfterSaleInfo } from '@/api/after-sale'
|
||||
import storage from '@/utils/storage'
|
||||
// 深链进入时拦截 E_COUPON,后端 apply/save 亦会拒绝
|
||||
import { isECouponOrder } from '@/utils/goodsType.js'
|
||||
|
||||
const sn = ref('')
|
||||
const sku = ref<any>({})
|
||||
@@ -71,6 +73,16 @@ const applyInfo = ref<any>({})
|
||||
onLoad((options) => {
|
||||
sn.value = options?.sn || ''
|
||||
sku.value = storage.getAfterSaleData()
|
||||
if (isECouponOrder(sku.value?.orderType)) {
|
||||
uni.showToast({
|
||||
title: '电子卡券订单不支持售后',
|
||||
icon: 'none',
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1500)
|
||||
return
|
||||
}
|
||||
init()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user