完善页面
This commit is contained in:
@ -20,4 +20,70 @@ export const OrderStatusText: Record<OrderStatus, string> = {
|
||||
[OrderStatus.Used]: '已使用',
|
||||
[OrderStatus.AfterSaleApply]: '申请售后',
|
||||
[OrderStatus.AfterSaleFinished]: '售后完成'
|
||||
}
|
||||
}
|
||||
|
||||
// 团购类型
|
||||
export enum GroupBuyingCategory {
|
||||
Direct = 'direct', // 直营店
|
||||
Franchise = 'franchise', // 加盟店
|
||||
DouYin = 'douyin' // 抖音团购
|
||||
}
|
||||
|
||||
// 店铺类型对应名称
|
||||
export const GroupBuyingCategoryText: Record<GroupBuyingCategory, string> = {
|
||||
[GroupBuyingCategory.Direct]: '直营店',
|
||||
[GroupBuyingCategory.Franchise]: '加盟店',
|
||||
[GroupBuyingCategory.DouYin]: '抖音',
|
||||
}
|
||||
|
||||
// 通用团购订单状态(仅团购业务的三个)
|
||||
export enum GroupBuyingCategoryOrderStatus {
|
||||
ToUse = 'toUse', // 待使用
|
||||
Used = 'used', // 已使用(交易完成)
|
||||
Refunded = 'refunded' // 已退款
|
||||
}
|
||||
|
||||
// 对应名称
|
||||
export const GroupBuyingStatusText: Record<GroupBuyingCategoryOrderStatus, string> = {
|
||||
[GroupBuyingCategoryOrderStatus.ToUse]: '待使用',
|
||||
[GroupBuyingCategoryOrderStatus.Used]: '已使用',
|
||||
[GroupBuyingCategoryOrderStatus.Refunded]: '已退款'
|
||||
}
|
||||
|
||||
// 对应tabbar显示的标题
|
||||
export const GroupBuyingStatusTitle: Record<GroupBuyingCategory, Record<GroupBuyingCategoryOrderStatus, string>> = {
|
||||
[GroupBuyingCategory.Direct]: {
|
||||
[GroupBuyingCategoryOrderStatus.ToUse]: '待使用',
|
||||
[GroupBuyingCategoryOrderStatus.Used]: '交易完成',
|
||||
[GroupBuyingCategoryOrderStatus.Refunded]: '售后完成'
|
||||
},
|
||||
[GroupBuyingCategory.Franchise]: {
|
||||
[GroupBuyingCategoryOrderStatus.ToUse]: '待使用',
|
||||
[GroupBuyingCategoryOrderStatus.Used]: '交易完成',
|
||||
[GroupBuyingCategoryOrderStatus.Refunded]: '售后完成'
|
||||
},
|
||||
[GroupBuyingCategory.DouYin]: {
|
||||
[GroupBuyingCategoryOrderStatus.ToUse]: '待使用',
|
||||
[GroupBuyingCategoryOrderStatus.Used]: '已使用', // DouYin专属
|
||||
[GroupBuyingCategoryOrderStatus.Refunded]: '售后完成'
|
||||
}
|
||||
}
|
||||
|
||||
// 不同门团购型可用状态映射(目前两类相同,后期若不同可单独调整)
|
||||
export const CategoryStatusMap: Record<GroupBuyingCategory, GroupBuyingCategoryOrderStatus[]> = {
|
||||
[GroupBuyingCategory.Direct]: [
|
||||
GroupBuyingCategoryOrderStatus.ToUse,
|
||||
GroupBuyingCategoryOrderStatus.Used,
|
||||
GroupBuyingCategoryOrderStatus.Refunded
|
||||
],
|
||||
[GroupBuyingCategory.Franchise]: [
|
||||
GroupBuyingCategoryOrderStatus.ToUse,
|
||||
GroupBuyingCategoryOrderStatus.Used,
|
||||
GroupBuyingCategoryOrderStatus.Refunded
|
||||
],
|
||||
[GroupBuyingCategory.DouYin]: [
|
||||
GroupBuyingCategoryOrderStatus.ToUse,
|
||||
GroupBuyingCategoryOrderStatus.Used,
|
||||
GroupBuyingCategoryOrderStatus.Refunded
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user