前端小程序

这个提交包含在:
可乐加冰
2026-09-14 17:24:53 +08:00
父节点 bb69a43a0f
当前提交 019630f12c
共有 2629 个文件被更改,包括 403657 次插入 和 0 次删除

查看文件

@@ -0,0 +1,44 @@
/**
* 提现方式配置(共享)
*/
export const WITHDRAW_TYPES = {
bank: {
iconKey: '/imgs/wallet/bank_type.png',
title: '银行卡转账',
value: 'bank',
desc: '提现至本人银行卡账户'
},
wechat: {
iconKey: '/imgs/wallet/wx_type.png',
title: '微信零钱',
value: 'wechat',
desc: '提现至微信零钱,需授权绑定'
},
alipay: {
iconKey: '/imgs/wallet/ali_type.png',
title: '支付宝账户',
value: 'alipay',
desc: '提现至支付宝账户'
}
};
export function getWithdrawTypeList(imgBase) {
return Object.keys(WITHDRAW_TYPES).reduce((acc, key) => {
const item = WITHDRAW_TYPES[key];
acc[key] = {
...item,
icon: imgBase + item.iconKey
};
return acc;
}, {});
}
export function normalizeMethods(methods) {
if (Array.isArray(methods)) {
return methods;
}
if (typeof methods === 'string' && methods) {
return methods.split(',').map(item => item.trim()).filter(Boolean);
}
return [];
}