feat: 完善会员资金明细与退款转账逻辑,新增支付密码组件与资金流水界面

这个提交包含在:
2026-10-24 17:55:36 +08:00
父节点 6b86177b5f
当前提交 b6c53abb84
共有 30 个文件被更改,包括 1222 次插入 和 537 次删除

查看文件

@@ -508,6 +508,21 @@ export const mockRoutes = {
const coupons = buildUserCoupons()
return ok({ ...datasets.assets, coupons, couponCount: coupons.length })
},
/** 余额明细(支持 type 筛选:recharge=充值 / expense=消费 / refund=退款,与后端 Member::flows 口径一致) */
'GET /member/flows': ({ data }) => {
let rows = datasets.financeFlows || []
const type = data && data.type
if (type === 'recharge') rows = rows.filter((f) => f.scene === '余额充值')
else if (type === 'expense') rows = rows.filter((f) => f.type === 'expense')
else if (type === 'refund') rows = rows.filter((f) => (f.scene || '').includes('退款'))
return ok(paginate(rows, data && data.page, data && data.size))
},
/** 设置/修改支付密码(6 位数字) */
'POST /member/pay-password/set': ({ data }) => {
const password = data && data.password
if (!/^\d{6}$/.test(String(password || ''))) fail('支付密码必须是 6 位数字')
return ok({ hasPayPassword: true })
},
// ==================== 用户端 · 收藏与关注 ====================
'GET /favorite/list': ({ data }) => {