Browse Source

fix(R17): 结单禁聊

dev
cursor 1 day ago
parent
commit
5f5109603c
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      app/controller/Message.php

+ 4
- 3
app/controller/Message.php View File

@ -56,10 +56,11 @@ class Message extends BaseController
return json(['code' => -1, 'data' => null, 'msg' => '消息过长,最多500字']);
}
// 拒单禁聊:订单已取消(status=3)禁止发送
// 拒单禁聊+结单禁聊:订单已取消(status=3)或已完成(status=2)禁止发送
$order = \app\model\Order::where('card_no', $cardNo)->order('id', 'desc')->find();
if ($order && intval($order->status) === 3) {
return json(['code' => -1, 'data' => null, 'msg' => '订单已取消,会话已结束']);
if ($order && (intval($order->status) === 3 || intval($order->status) === 2)) {
$msg = $order->status === 3 ? '订单已取消,会话已结束' : '订单已完成,会话已结束';
return json(['code' => -1, 'data' => null, 'msg' => $msg]);
}
// 存储原始文本,Vue 模板 {{ }} 自动转义防 XSS


Loading…
Cancel
Save