feat: 新增提现详情页与撤销微信转账功能

新增分销提现单详情页面及接口,支持查看提现单据完整信息;新增后台撤销转账中提现单功能,前端添加对应操作按钮与交互逻辑;完善提现记录跳转逻辑,支持点击进入详情页,同时新增部署脚本同步线上代码。
这个提交包含在:
2026-10-28 17:46:51 +08:00
父节点 ea26329e80
当前提交 589d6aa216
共有 10 个文件被更改,包括 1144 次插入 和 4 次删除

查看文件

@@ -376,6 +376,57 @@ class Distribution extends V1
$this->ok($list);
}
/**
* D8 提现单详情
* GET /api/v1/distribution/withdraw-detail 入参 {id|withdrawNo}
*
* @return void 输出提现流水单据详细信息JSON
*/
public function withdrawDetail()
{
$user = $this->auth();
$id = (int)$this->input('id', 0);
$no = trim((string)$this->input('withdrawNo', ''));
$query = Db::name('fc_withdraw')->where('user_id', $user['id']);
if ($id > 0) {
$query->where('id', $id);
} elseif ($no !== '') {
$query->where('withdraw_no', $no);
} else {
$this->fail('参数错误');
}
$row = $query->find();
if (!$row) {
$this->fail('提现记录不存在');
}
$epay = (array)get_addon_config('epay');
$wx = isset($epay['wechat']) && is_array($epay['wechat']) ? $epay['wechat'] : [];
$mchId = isset($wx['mch_id']) ? (string)$wx['mch_id'] : '1118898018';
$appId = isset($wx['miniapp_id']) ? (string)$wx['miniapp_id'] : 'wxbfcb778f3019cff8';
$this->ok([
'id' => (int)$row['id'],
'withdrawNo' => (string)$row['withdraw_no'],
'amount' => round((float)$row['amount'], 2),
'channel' => (string)$row['channel'],
'status' => (string)$row['status'],
'reason' => (string)$row['reason'],
'outBillNo' => (string)$row['out_bill_no'],
'transferStatus' => (string)$row['transfer_status'],
'transferId' => (string)$row['transfer_id'],
'packageInfo' => (string)$row['package_info'],
'failReason' => (string)$row['fail_reason'],
'createdAt' => $this->iso($row['createtime']),
'payTime' => !empty($row['paytime']) ? $this->iso($row['paytime']) : '',
'transferTime' => !empty($row['transfer_time']) ? $this->iso($row['transfer_time']) : '',
'transferMchId' => $mchId,
'transferAppId' => $appId,
]);
}
/**
* D7 手动输入邀请码补绑推荐人(老用户不支持自动补绑,仅支持通过手动填写邀请码完成补绑)
* POST /api/v1/distribution/bind 入参 {inviteCode}