40 lines
1.1 KiB
TypeScript
40 lines
1.1 KiB
TypeScript
import {
|
|
ArrowRightLeft,
|
|
Gift,
|
|
Sparkles,
|
|
type LucideIcon,
|
|
} from 'lucide-react'
|
|
|
|
import type {goodsType} from '@/types/business.type.ts'
|
|
|
|
export type GoodCategoryMeta = {
|
|
nameKey: string
|
|
ctaLabelKey: string
|
|
icon: LucideIcon
|
|
}
|
|
|
|
export const HOME_CATEGORY_META_MAP: Record<goodsType, GoodCategoryMeta> = {
|
|
WITHDRAW: {
|
|
nameKey: 'goods.categories.WITHDRAW',
|
|
ctaLabelKey: 'goods.actions.WITHDRAW',
|
|
icon: ArrowRightLeft,
|
|
},
|
|
BONUS: {
|
|
nameKey: 'goods.categories.BONUS',
|
|
ctaLabelKey: 'goods.actions.BONUS',
|
|
icon: Sparkles,
|
|
},
|
|
PHYSICAL: {
|
|
nameKey: 'goods.categories.PHYSICAL',
|
|
ctaLabelKey: 'goods.actions.PHYSICAL',
|
|
icon: Gift,
|
|
},
|
|
}
|
|
|
|
export const HOME_GOOD_TYPE_ORDER = ['WITHDRAW', 'BONUS', 'PHYSICAL'] as const satisfies readonly goodsType[]
|
|
|
|
export const API_ORIGIN = import.meta.env.VITE_API_ORIGIN ?? 'https://playx-api.cjdhr.top'
|
|
|
|
/**@description 待处理 / 已完成 / 已发货 / 已驳回 */
|
|
export const ORDER_STATUS = ['PENDING','COMPLETED','SHIPPED','REJECTED']
|