Commit 53475b00 authored by zw's avatar zw

liaotian

parent 6edaa036
......@@ -81,6 +81,7 @@ class AppChat extends Basic
"user_id" => 118,
"mobile" => "15821506182",
"source" => 1 //1经纪人 2用户
"device_id" => "ssss1231231123123",
"push_id" => "ssss1231231123123"
);*/
......@@ -93,13 +94,14 @@ class AppChat extends Basic
$user_id = $params['user_id'];
$mobile = $params['mobile'];
$source = $params['source'];
$device_id = $params['device_id'];
$push_id = $params['push_id'];
if (!$user_id || !$mobile || !$source || !$push_id) {
return $this->response(ErrorCodeConst::ERROR_CODE_PARAM_NOT_EXIST, "请求参数错误");
}
$only_arr = $this->_chat->register($user_id, $mobile, $source, $push_id);
$only_arr = $this->_chat->register($user_id, $mobile, $source, $device_id, $push_id);
if ($only_arr["code"] == 200) {
return $this->response("200", "success", [ "only_id" => $only_arr["only_id"] ]);
......
......@@ -58,13 +58,14 @@ class ChatService
* @param $user_id
* @param $mobile
* @param $source
* @param $device_id
* @param $push_id
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function register($user_id, $mobile, $source, $push_id)
public function register($user_id, $mobile, $source,$device_id, $push_id)
{
$params["type"] = $source;
$params["user_id"] = $user_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