feat: 完善会员资金明细与退款转账逻辑,新增支付密码组件与资金流水界面
这个提交包含在:
@@ -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 }) => {
|
||||
|
||||
在新工单中引用
屏蔽一个用户