55 lines
1.3 KiB
TypeScript
55 lines
1.3 KiB
TypeScript
interface PayMethod {
|
|
id: number
|
|
name: string
|
|
icon: string
|
|
balance: number
|
|
value: number,
|
|
type: string
|
|
}
|
|
|
|
// 支付方式分类
|
|
export enum PayCategory {
|
|
PlatformBalance = 'PlatformBalance', // 平台余额
|
|
StoreBalance = 'StoreBalance', // 门店余额
|
|
WeChatPay = 'WeChatPay', // 微信支付
|
|
}
|
|
|
|
export enum PayValue {
|
|
PlatformBalance = 1, // 平台余额
|
|
WeChatPay = 2, // 微信支付
|
|
StoreBalance = 3, // 门店余额
|
|
}
|
|
|
|
export const PayValueMap = {
|
|
[PayValue.PlatformBalance]: 'balance',
|
|
[PayValue.WeChatPay]: 'wx',
|
|
[PayValue.StoreBalance]: 'store_balance',
|
|
}
|
|
|
|
// 支付方式列表
|
|
export const PayList: PayMethod[] = [
|
|
{
|
|
id: 1,
|
|
name: '平台余额',
|
|
icon: 'icon/icon_platform_balance.png',
|
|
balance: 0,
|
|
value: PayValue.PlatformBalance,
|
|
type: PayCategory.PlatformBalance
|
|
},
|
|
{
|
|
id: 2,
|
|
name: '门店余额',
|
|
icon: 'icon/icon_store_balance.png',
|
|
balance: 0,
|
|
value: PayValue.StoreBalance,
|
|
type: PayCategory.StoreBalance
|
|
},
|
|
{
|
|
id: 3,
|
|
name: '微信支付',
|
|
icon: 'icon/icon_weichat.png',
|
|
balance: 0,
|
|
value: PayValue.WeChatPay,
|
|
type: PayCategory.WeChatPay
|
|
}
|
|
] |