|
|
@@ -88,6 +88,9 @@ class User extends BaseModel
|
|
|
|
|
|
$list = User::where('cs_uid', $kefu_user_id)->select()->toArray();
|
|
|
foreach($list as $item) {
|
|
|
+ //是否弹层提醒
|
|
|
+ $is_warning = $item['service_status'] == 1 || $item['service_status'] == 2 ? 1 : 0;
|
|
|
+
|
|
|
$service_status = $item['is_online'] == 1 ? 0 : -1 ;
|
|
|
//更新用户会话状态
|
|
|
User::where('user_id', $item['user_id'])->update(['cs_uid' => $cs_uid, 'service_status' => $service_status, 'service_start' => time(), 'timeout_type' => 0]);
|
|
|
@@ -111,7 +114,7 @@ class User extends BaseModel
|
|
|
KefuLog::addData($cs_uid, $user_id, 3);
|
|
|
|
|
|
//通知关闭聊天框
|
|
|
- wsSendMsg($old_cs_uid,'closeChat',['user_id'=>$user_id, 'realname' => $item['realname']]);
|
|
|
+ wsSendMsg($old_cs_uid,'closeChat',['user_id'=>$user_id, 'realname' => $item['realname'], 'is_warning' => $is_warning]);
|
|
|
}
|
|
|
//结束客服忙碌时间
|
|
|
KefuTime::endData($admin_id, 1);
|