feat: 新增提现文案翻译工具类,统一处理失败与驳回原因

这个提交包含在:
2026-10-28 18:21:12 +08:00
父节点 589d6aa216
当前提交 f332dfd2b0
共有 6 个文件被更改,包括 184 次插入 和 12 次删除

查看文件

@@ -3,6 +3,7 @@
namespace app\admin\controller\fc;
use app\common\controller\Backend;
use app\common\library\WithdrawText;
use think\Db;
/**
@@ -131,6 +132,8 @@ class Withdraw extends Backend
'totalWithdrawn' => round($totalWithdrawn, 2),
'withdrawable' => round($withdrawable, 2),
'rejectReasons' => $rejectReasons,
'failReasonText' => WithdrawText::fail($row['fail_reason']),
'reasonText' => WithdrawText::reason($row['reason']),
]);
return $this->view->fetch();
@@ -293,7 +296,7 @@ class Withdraw extends Backend
if ($latest['status'] === 'paid') {
$this->success('微信转账已完成,单据已更新为「已成功到账」');
} elseif ($latest['status'] === 'failed') {
$this->error('微信转账已失败/已撤销:' . ($latest['fail_reason'] ?: '未知原因'));
$this->error('微信转账已失败/已撤销:' . (WithdrawText::fail($latest['fail_reason']) ?: '未知原因'));
} else {
$this->success('已同步微信最新状态:' . $stText . '(微信已受理,需收款人在微信完成确认方可到账)');
}