feat: 新增提现文案翻译工具类,统一处理失败与驳回原因
这个提交包含在:
@@ -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 . '(微信已受理,需收款人在微信完成确认方可到账)');
|
||||
}
|
||||
|
||||
@@ -186,15 +186,15 @@
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if condition="!empty($row.fail_reason)"}
|
||||
{if condition="!empty($failReasonText)"}
|
||||
<div class="alert alert-danger" style="margin-top:6px;margin-bottom:8px;padding:10px 14px;">
|
||||
<i class="fa fa-exclamation-triangle"></i> <strong>打款失败说明:</strong>{$row.fail_reason|htmlentities}
|
||||
<i class="fa fa-exclamation-triangle"></i> <strong>打款失败说明:</strong>{$failReasonText|htmlentities}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if condition="!empty($row.reason)"}
|
||||
{if condition="!empty($reasonText)"}
|
||||
<div class="alert alert-warning" style="margin-top:6px;margin-bottom:8px;padding:10px 14px;">
|
||||
<i class="fa fa-info-circle"></i> <strong>拒绝/驳回原因:</strong>{$row.reason|htmlentities}
|
||||
<i class="fa fa-info-circle"></i> <strong>拒绝/驳回原因:</strong>{$reasonText|htmlentities}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
在新工单中引用
屏蔽一个用户