|
|
@@ -12,7 +12,7 @@ use GatewayClient\Gateway;
|
|
|
|
|
|
class ChatController extends BaseController
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
//聊天首页,前端使用
|
|
|
public function actionIndex()
|
|
|
{
|
|
|
@@ -27,13 +27,15 @@ class ChatController extends BaseController
|
|
|
$userId = $this->userId;
|
|
|
Gateway::bindUid($clientId, $userId);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//聊天双方的用户信息 shish 2019.12.30
|
|
|
public function actionBegin()
|
|
|
{
|
|
|
- util::success(['merchant'=>$this->merchant,'user'=>$this->user]);
|
|
|
+ //新增最近联系人
|
|
|
+ ChatService::addRecentlyUser($this->merchantId, $this->userId);
|
|
|
+ util::success(['merchant' => $this->merchant, 'user' => $this->user]);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//发消息给老板 shish 2019.12.28
|
|
|
public function actionSend()
|
|
|
{
|
|
|
@@ -103,4 +105,11 @@ class ChatController extends BaseController
|
|
|
Gateway::closeClient($clientId);
|
|
|
}
|
|
|
|
|
|
+ //最近聊天的内容 shish 2019.12.29
|
|
|
+ public function actionRecentlyMessage()
|
|
|
+ {
|
|
|
+ $respond = ChatService::getMessageList($this->userId);
|
|
|
+ util::success($respond);
|
|
|
+ }
|
|
|
+
|
|
|
}
|