fixed
This commit is contained in:
@@ -45,6 +45,12 @@ class TychatLogic extends BaseLogic
|
||||
$json = Tools::wss_json($action, 'chat_msg参数错误');
|
||||
return Gateway::sendToClient($client_id, $json);
|
||||
}
|
||||
if(empty($data['items']['type'])){
|
||||
$json = Tools::wss_json($action, 'type参数错误,缺少角色类型:doc、user');
|
||||
return Gateway::sendToClient($client_id, $json);
|
||||
|
||||
}
|
||||
$type = $data['items']['type'];//角色类型
|
||||
//if(empty($data['items']['username'])){
|
||||
// $json = Tools::wss_json($action, 'username参数错误');
|
||||
// return Gateway::sendToClient($client_id, $json);
|
||||
@@ -119,6 +125,23 @@ class TychatLogic extends BaseLogic
|
||||
return Tools::set_ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询聊天记录
|
||||
*/
|
||||
function getChatHistory(){
|
||||
return Mmodel::catchJson(function (){
|
||||
$username = input('username');
|
||||
if(empty($username)){
|
||||
return Tools::set_fail('参数错误');
|
||||
}
|
||||
$list = Db::table('fa_ty_chathistory')
|
||||
->where('username',$username)
|
||||
->order('id desc')
|
||||
->select();
|
||||
return Tools::set_ok('查询成功',$list);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* desc:健康洞察
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user