Commit ff3e3891 authored by clone's avatar clone

bug

parent b8471731
......@@ -92,6 +92,50 @@ class AppChat extends Basic
if (!isset($params['is_self']) || !isset($params['source']) || !isset($params['user_id']) || !isset($params['mobile'])) {
return $this->response(ErrorCodeConst::ERROR_CODE_PARAM_NOT_EXIST, "请求参数错误");
}
/*if ($params['is_self'] == 1 && (!isset($params['device_id']) || !isset($params['push_id']))) {
return $this->response(ErrorCodeConst::ERROR_CODE_PARAM_NOT_EXIST, "请求参数错误1");
}*/
$user_id = $params['user_id'];
$mobile = $params['mobile'];
$source = $params['source'];
$device_id = !isset($params['device_id']) ? null : $params['device_id'];
$push_id = !isset($params['push_id']) ? null : $params['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"] ]);
} else {
return $this->response("101", $only_arr["msg"]);
}
}
/**
* 验证用户角色,生成唯一id
* @return \think\Response
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function userChatV2()
{
$params = $this->params;
/* $params = array(
"user_id" => 80,
"mobile" => "15821506182",
"is_self" => 1,//1是 2否
"source" => 1, //1经纪人 2用户
"device_id" => "ssss1231231123123",
"push_id" => "ssss1231231123123"
);*/
if (!isset($params['is_self']) || !isset($params['source']) || !isset($params['user_id']) || !isset($params['mobile'])) {
return $this->response(ErrorCodeConst::ERROR_CODE_PARAM_NOT_EXIST, "请求参数错误");
}
if ($params['is_self'] == 1 && (!isset($params['device_id']) || !isset($params['push_id']))) {
return $this->response(ErrorCodeConst::ERROR_CODE_PARAM_NOT_EXIST, "请求参数错误1");
}
......
......@@ -238,7 +238,6 @@ Route::group('index', [
'receiptImgList' => [ 'index/Collection/receiptImgList', [ 'method' => 'post|get' ] ],//收款列表-收款图片列表
'getTaxesById' => [ 'index/Finance/getTaxesById', [ 'method' => 'POST|GET' ] ], //财务结单
'financeUpdateLog' => [ 'index/Finance/financeUpdateLog', [ 'method' => 'POST|GET' ] ], //财务结单
'noticeIndex' => [ 'index/notice/index', [ 'method' => 'GET' ] ], //公告列表
......@@ -246,25 +245,24 @@ Route::group('index', [
'delNotice' => [ 'index/notice/delNotice', [ 'method' => 'POST' ] ], //删除公告
'addNotice' => [ 'index/notice/addNotice', [ 'method' => 'POST' ] ], //新增公告
'addNoticeView' => [ 'index/notice/addNoticeView', [ 'method' => 'GET' ] ], //新增公告
'getWxInfo' => [ 'index/WxAuthorization/getWxInfo', [ 'method' => 'POST|GET' ] ], //wx
'evaluationList' => [ 'index/Evaluation/evaluationList', [ 'method' => 'POST|GET' ] ], //评价列表 朱伟 2018-06-13
'marchInList' => [ 'index/MarchIn/marchInList', [ 'method' => 'POST|GET' ] ], //进场记录列表 朱伟 2018-06-13
'superviseList' => [ 'index/Supervise/superviseList', [ 'method' => 'POST|GET' ] ], //监督执行列表 朱伟 2018-06-14
'business_school' => [ 'index/news/index', [ 'method' => 'GET' ] ], //商学院资讯列表
'addNews' => [ 'index/news/addNews', [ 'method' => 'POST' ] ], //新增商学院资讯
'getNewsInfo' => [ 'index/news/getNewsInfo', [ 'method' => 'GET' ] ], //商学院资讯详情
'getNewsLabel' => [ 'index/news/getNewsLabel', [ 'method' => 'GET' ] ], //商学院资标签
'delNews' => [ 'index/news/delNews', [ 'method' => 'POST' ] ], //删除商学院文章
'new_text' => [ 'index/news/newText', [ 'method' => 'GET' ] ], //删除商学院文章
'agentEvaluateNumAndFraction' => [ 'index/agent/agentEvaluateNumAndFraction', [ 'method' => 'POST|GET' ] ],//经纪人列表计算-评价次数和分数 朱伟 2018-07-03
'uploadImg' => [ 'index/UploadImg/uploadImg', [ 'method' => 'POST' ] ],//全局图片上传
'followUpList' => [ 'index/HouseFollowUp/followUpList', [ 'method' => 'GET' ] ],//商铺跟进liu
'inspectionRecordList' => [ 'index/InspectionRecord/inspectionRecordList', [ 'method' => 'GET' ] ],//约带看记录liu
'getWxInfo' => [ 'index/WxAuthorization/getWxInfo', [ 'method' => 'POST|GET' ] ], //wx
'evaluationList' => [ 'index/Evaluation/evaluationList', [ 'method' => 'POST|GET' ] ], //评价列表 朱伟 2018-06-13
'marchInList' => [ 'index/MarchIn/marchInList', [ 'method' => 'POST|GET' ] ], //进场记录列表 朱伟 2018-06-13
'superviseList' => [ 'index/Supervise/superviseList', [ 'method' => 'POST|GET' ] ], //监督执行列表 朱伟 2018-06-14
'business_school' => [ 'index/news/index', [ 'method' => 'GET' ] ], //商学院资讯列表
'addNews' => [ 'index/news/addNews', [ 'method' => 'POST' ] ], //新增商学院资讯
'getNewsInfo' => [ 'index/news/getNewsInfo', [ 'method' => 'GET' ] ], //商学院资讯详情
'getNewsLabel' => [ 'index/news/getNewsLabel', [ 'method' => 'GET' ] ], //商学院资标签
'delNews' => [ 'index/news/delNews', [ 'method' => 'POST' ] ], //删除商学院文章
'new_text' => [ 'index/news/newText', [ 'method' => 'GET' ] ], //删除商学院文章
'agentEvaluateNumAndFraction' => [ 'index/agent/agentEvaluateNumAndFraction', [ 'method' => 'POST|GET' ] ],//经纪人列表计算-评价次数和分数 朱伟 2018-07-03
'uploadImg' => [ 'index/UploadImg/uploadImg', [ 'method' => 'POST' ] ],//全局图片上传
'followUpList' => [ 'index/HouseFollowUp/followUpList', [ 'method' => 'GET' ] ],//商铺跟进liu
'inspectionRecordList' => [ 'index/InspectionRecord/inspectionRecordList', [ 'method' => 'GET' ] ],//约带看记录liu
]);
......@@ -345,6 +343,7 @@ Route::group('api', [
Route::group('chat', [
'index' => [ 'chat/AppChat/index', [ 'method' => 'get' ] ],
'userChat' => [ 'chat/AppChat/userChat', [ 'method' => 'post|get' ] ],
'userChatV2' => [ 'chat/AppChat/userChatV2', [ 'method' => 'post|get' ] ],
'pushMsg' => [ 'chat/AppChat/pushMsg', [ 'method' => 'post|get' ] ],
'getChatHistory' => [ 'chat/AppChat/getChatHistory', [ 'method' => 'post|get' ] ],
'getUserOrAgentInfo' => [ 'chat/AppChat/getUserOrAgentInfo', [ 'method' => 'post|get' ] ],
......@@ -388,7 +387,7 @@ Route::group('broker', [
'getBeforeBillInfo' => [ 'api_broker/OrderLog/getBeforeBillInfo', [ 'method' => 'get|post' ] ],
'savePosBillMessage' => [ 'api_broker/OrderLog/savePosBillMessage', [ 'method' => 'get|post' ] ],
'collectingBill' => [ 'api_broker/OrderLog/collectingBill', [ 'method' => 'get|post' ] ],
'collectingBillV2' => [ 'api_broker/OrderLog/collectingBillV2', [ 'method' => 'get|post' ] ],
'collectingBillV2' => [ 'api_broker/OrderLog/collectingBillV2', [ 'method' => 'get|post' ] ],
'refund' => [ 'api_broker/OrderLog/refund', [ 'method' => 'get|post' ] ],
'bargain' => [ 'api_broker/OrderLog/bargain', [ 'method' => 'get|post' ] ],
'statusBargain' => [ 'api_broker/OrderLog/statusBargain', [ 'method' => 'get|post' ] ],
......@@ -428,21 +427,21 @@ Route::group('broker', [
'addShopFollowUp' => [ 'api_broker/Shop/addShopFollowUp', [ 'method' => 'post' ] ], //新增商铺跟进记录
'reportList' => [ 'api_broker/Report/reportList', [ 'method' => 'get' ] ],
'reportListForPc' => [ 'api_broker/Report/reportListForPc', [ 'method' => 'get' ] ],
'orderDetail' => [ 'api_broker/OrderLog/orderDetail', [ 'method' => 'get|post' ] ],
'reportList' => [ 'api_broker/Report/reportList', [ 'method' => 'get' ] ],
'reportListForPc' => [ 'api_broker/Report/reportListForPc', [ 'method' => 'get' ] ],
'orderDetail' => [ 'api_broker/OrderLog/orderDetail', [ 'method' => 'get|post' ] ],
'token' => [ 'api_broker/broker/token', [ 'method' => 'get' ] ],
'getAgentsByPhone' => [ 'api_broker/broker/getAgentsByPhone', [ 'method' => 'get' ] ],
'agentsPhone' => [ 'api_broker/CellPhone/agentsPhone', [ 'method' => 'get|post' ] ], //获取经纪人拨打界面手机号
'dayStatement' => [ 'api_broker/Statement/dayStatement', [ 'method' => 'get|post' ] ],
'selectReportAll' => [ 'api_broker/OrderLog/selectReportAll', [ 'method' => 'get|post' ] ],
'selectReportAllV2' => [ 'api_broker/OrderLog/selectReportAllV2', [ 'method' => 'get|post' ] ],
'selectReportAllV3' => [ 'api_broker/OrderLog/selectReportAllV3', [ 'method' => 'get|post' ] ],
'searchOrder' => [ 'api_broker/OrderLog/searchOrder', [ 'method' => 'get|post' ] ],
'bargainList' => [ 'api_broker/OrderLog/bargainList', [ 'method' => 'get|post' ] ],
'bargainDetail' => [ 'api_broker/OrderLog/bargainDetail', [ 'method' => 'get|post' ] ],
'token' => [ 'api_broker/broker/token', [ 'method' => 'get' ] ],
'getAgentsByPhone' => [ 'api_broker/broker/getAgentsByPhone', [ 'method' => 'get' ] ],
'agentsPhone' => [ 'api_broker/CellPhone/agentsPhone', [ 'method' => 'get|post' ] ], //获取经纪人拨打界面手机号
'dayStatement' => [ 'api_broker/Statement/dayStatement', [ 'method' => 'get|post' ] ],
'selectReportAll' => [ 'api_broker/OrderLog/selectReportAll', [ 'method' => 'get|post' ] ],
'selectReportAllV2' => [ 'api_broker/OrderLog/selectReportAllV2', [ 'method' => 'get|post' ] ],
'selectReportAllV3' => [ 'api_broker/OrderLog/selectReportAllV3', [ 'method' => 'get|post' ] ],
'searchOrder' => [ 'api_broker/OrderLog/searchOrder', [ 'method' => 'get|post' ] ],
'bargainList' => [ 'api_broker/OrderLog/bargainList', [ 'method' => 'get|post' ] ],
'bargainDetail' => [ 'api_broker/OrderLog/bargainDetail', [ 'method' => 'get|post' ] ],
'searchAgents' => [ 'api_broker/OrderLog/searchAgents', [ 'method' => 'get' ] ],
'searchBargainList' => [ 'api_broker/OrderLog/searchBargainList', [ 'method' => 'get' ] ],
......@@ -506,17 +505,17 @@ Route::group('broker', [
'superviseListNew' => [ 'api_broker/Supervise/superviseList', [ 'method' => 'POST|GET' ] ], //监督执行列表 朱伟 2018-06-15
'addSupervise' => [ 'api_broker/Supervise/addSupervise', [ 'method' => 'POST|GET' ] ], //新增-监督执行 朱伟 2018-06-20
'superviseUploadImg' => [ 'api_broker/Supervise/superviseUploadImg', [ 'method' => 'POST|GET' ] ], //监督执行-上传图片 朱伟 2018-06-20
'uploadImg' => [ 'api_broker/UploadImg/uploadImg', [ 'method' => 'POST|GET' ] ], //图片上传
'business_school' => [ 'api_broker/news/index', [ 'method' => 'GET' ] ], //商学院资讯列表
'getNewsInfo' => [ 'api_broker/news/getNewsInfo', [ 'method' => 'GET' ] ], //商学院资讯详情
'getNewsLabel' => [ 'api_broker/news/getNewsLabel', [ 'method' => 'GET' ] ], //商学院标签
'getComment' => [ 'api_broker/news/getComment', [ 'method' => 'GET' ] ], //商学院评论列表
'commentNews' => [ 'api_broker/news/commentNews', [ 'method' => 'POST' ] ], //评论商学院文章
'addCollectUser' => [ 'api_broker/CollectUser/addCollectUser', [ 'method' => 'POST|GET' ] ], //收藏或取消收藏客户 朱伟 2018-07-04
'addCollectHouse' => [ 'api_broker/CollectHouse/addCollectHouse', [ 'method' => 'POST|GET' ] ], //收藏或取消收藏商铺 朱伟 2018-07-04
'getCollectUserList' => [ 'api_broker/CollectUser/getCollectUserList', [ 'method' => 'POST|GET' ] ], //查询收藏数据 朱伟 2018-07-04
'getCollectHouseList' => [ 'api_broker/CollectHouse/getCollectHouseList', [ 'method' => 'POST|GET' ] ], //查询收藏数据 朱伟 2018-07-04
'uploadImg' => [ 'api_broker/UploadImg/uploadImg', [ 'method' => 'POST|GET' ] ], //图片上传
'business_school' => [ 'api_broker/news/index', [ 'method' => 'GET' ] ], //商学院资讯列表
'getNewsInfo' => [ 'api_broker/news/getNewsInfo', [ 'method' => 'GET' ] ], //商学院资讯详情
'getNewsLabel' => [ 'api_broker/news/getNewsLabel', [ 'method' => 'GET' ] ], //商学院标签
'getComment' => [ 'api_broker/news/getComment', [ 'method' => 'GET' ] ], //商学院评论列表
'commentNews' => [ 'api_broker/news/commentNews', [ 'method' => 'POST' ] ], //评论商学院文章
'addCollectUser' => [ 'api_broker/CollectUser/addCollectUser', [ 'method' => 'POST|GET' ] ], //收藏或取消收藏客户 朱伟 2018-07-04
'addCollectHouse' => [ 'api_broker/CollectHouse/addCollectHouse', [ 'method' => 'POST|GET' ] ], //收藏或取消收藏商铺 朱伟 2018-07-04
'getCollectUserList' => [ 'api_broker/CollectUser/getCollectUserList', [ 'method' => 'POST|GET' ] ], //查询收藏数据 朱伟 2018-07-04
'getCollectHouseList' => [ 'api_broker/CollectHouse/getCollectHouseList', [ 'method' => 'POST|GET' ] ], //查询收藏数据 朱伟 2018-07-04
]);
......
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