模块说明
withdraw 提供会员提现能力:查看提现记录、填写提现申请(校验余额与账户信息)、提交申请(后台审核打款)。
鉴权级别:全部必须登录。同一会员同时只允许存在一条待处理申请。
接口一览
| 方法 |
URL |
鉴权 |
说明 |
| GET |
/api/withdraw |
公开 |
模块入口(占位,返回空数据) |
| GET |
/api/user/withdraw |
必须 |
我的提现记录 |
| GET |
/api/user/withdraw/apply |
必须 |
提现申请表单数据 |
| POST |
/api/user/withdraw/apply_post |
必须 |
提交提现申请 |
我的提现记录 GET /api/user/withdraw
{
"code": "OK",
"message": "",
"data": {
"apply_exist": true,
"title": "提现记录",
"withdraw_list": [ { "id": 1, "money": "...", "status": "...", "...": "" } ],
"money_total": "¥100.00",
"pager": { "...": "分页信息" },
"total": 2
},
"errors": {},
"request_id": "9f2a5c8e1b3d7f40"
}
apply_exist:是否存在待处理申请(存在时仅返回该字段为 true,用于禁止重复申请);
money_total:当前可提现余额(格式化字符串)。
提现申请表单 GET /api/user/withdraw/apply
{
"code": "OK",
"message": "",
"data": {
"title": "申请提现",
"withdraw": { "...": "最近一次提现记录(用于回填账户信息)" },
"money_total": "¥100.00"
},
"errors": {},
"request_id": "9f2a5c8e1b3d7f40"
}
| 场景 |
响应 |
| 已有待处理申请 |
422 BUSINESS_RULE_VIOLATION(withdraw_apply_exist) |
提交提现申请 POST /api/user/withdraw/apply_post
提交字段由提现表单请求校验(WithdrawApplyPostFormRequest,含提现金额与收款账户信息,如账户类型、账号、姓名等,以站点配置为准)。
{
"code": "OK",
"message": "提现申请已提交",
"data": {},
"errors": {},
"request_id": "9f2a5c8e1b3d7f40"
}
| 场景 |
响应 |
| 字段校验失败 |
422 INVALID_PARAMS,errors 带字段级错误明细 |
| 业务规则拒绝(余额不足、已有待处理申请等) |
422 BUSINESS_RULE_VIOLATION |
注意事项
- 提现是"申请制":提交后进入后台审核流程,状态变化体现在我的提现记录中;
- 重复申请防护为服务端强校验(
apply 与 apply_post 均校验),客户端可依赖 data.apply_exist 提前禁用入口。