feat(front): 新增售后申请图片上传功能
- 支持最多上传3张售后凭证图片 - 提供图片预览和删除功能 - 上传图片随售后申请一起提交
这个提交包含在:
@@ -20,14 +20,16 @@ namespace {
|
||||
\think\Db::name('user')->where('id',1)->update(['money'=>'50.00']);
|
||||
$id=\think\Db::name('pay_order')->insertGetId(['out_trade_no'=>'TEST'.bin2hex(random_bytes(10)), 'order_id'=>0,'order_no'=>'','user_id'=>1,'scene'=>'recharge','openid'=>'TEST','amount'=>'100.00','status'=>'paid']);
|
||||
$r=\app\common\library\RechargeRefundService::create($id,'20.00','客服退款',1);
|
||||
\app\common\library\RechargeRefundService::begin($r['id'],1,'同意');
|
||||
try { \app\common\library\RechargeRefundService::send($r['id']); throw new \Exception('Expected timeout'); }
|
||||
try { \app\common\library\RechargeRefundService::submit($r['id'],1); throw new \Exception('Expected timeout'); }
|
||||
catch (\RuntimeException $e) { if ($e->getMessage() !== 'TIMEOUT') throw $e; }
|
||||
$row=\think\Db::name('recharge_refund')->where('id',$r['id'])->find();
|
||||
if ($row['status'] !== 'unknown' || (float)\think\Db::name('user')->where('id',1)->value('money') !== 30.0) throw new \Exception('Timeout failed to preserve reservation');
|
||||
\app\common\library\RechargeRefundService::send($r['id']);
|
||||
$row=\think\Db::name('recharge_refund')->where('id',$r['id'])->find();
|
||||
if ($row['status'] !== 'success' || (float)\think\Db::name('pay_order')->where('id',$id)->value('refund_amount') !== 20.0) throw new \Exception('Retry failed');
|
||||
$next = \app\common\library\RechargeRefundService::create($id,'10.00','客服退款',1);
|
||||
$done = \app\common\library\RechargeRefundService::submit($next['id'],1);
|
||||
if ($done['status'] !== 'success' || (float)\think\Db::name('pay_order')->where('id',$id)->value('refund_amount') !== 30.0) throw new \Exception('Direct submission failed');
|
||||
echo "Recharge gateway timeout and retry passed\n";
|
||||
} finally { \think\Db::rollback(); }
|
||||
}
|
||||
|
||||
在新工单中引用
屏蔽一个用户