Commit 68a5a037 authored by clone's avatar clone

聊天

parent 52d1871e
......@@ -149,21 +149,21 @@ class AppChat extends Basic
{
$params = $this->params;
if (!isset($params['target_type']) || !isset($params['target']) || !isset($params['type'])
|| !isset($params['msg_content']) || !isset($params['source']) || !isset($params['is_user']) || !isset($params['from'])) {
return $this->response(ErrorCodeConst::ERROR_CODE_PARAM_NOT_EXIST, "请求参数错误");
}
/* $params = array(
$params = array(
'user_name' => 'cesh',
'msg_content' => 'ceshi666',
'target_type' => 'users',
'source' => '1',
'from' => 'admin',
'from' => 'qqqq',
'type' => '1',
'is_user' => '0',
'target' => '18112347151',
);*/
'target' => 'agent_5740',
);
if (!isset($params['target_type']) || !isset($params['target']) || !isset($params['type'])
|| !isset($params['msg_content']) || !isset($params['source']) || !isset($params['is_user']) || !isset($params['from'])) {
return $this->response(ErrorCodeConst::ERROR_CODE_PARAM_NOT_EXIST, "请求参数错误");
}
$user_name = isset($params['user_name']) ? $params['user_name'] : $params['from'];//用户昵称
$target_type = $params['target_type']; // 消息类型 users 给用户发消息。chatgroups: 给群发消息,chatrooms: 给聊天室发消息
$target = $params['target']; //接受人 if target_type 群 者表示群id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment