diff --git a/Server/application/api/controller/MessageController.php b/Server/application/api/controller/MessageController.php index 34b79b5b..74b4196d 100644 --- a/Server/application/api/controller/MessageController.php +++ b/Server/application/api/controller/MessageController.php @@ -18,7 +18,7 @@ class MessageController extends BaseController public function getFriendsList($pageIndex = '',$pageSize = '',$isInner = false) { // 获取授权token - $authorization = trim($this->request->header('authorization', $this->authorization)); + $authorization = $this->authorization; if (empty($authorization)) { if($isInner){ return json_encode(['code'=>500,'msg'=>'缺少授权信息']); @@ -122,7 +122,7 @@ class MessageController extends BaseController public function getMessageList() { // 获取授权token - $authorization = trim($this->request->header('authorization', $this->authorization)); + $authorization = $this->authorization; if (empty($authorization)) { return errorJson('缺少授权信息'); } @@ -181,7 +181,7 @@ class MessageController extends BaseController public function getChatroomList($pageIndex = '',$pageSize = '',$isInner = false) { // 获取授权token - $authorization = trim($this->request->header('authorization', $this->authorization)); + $authorization = $this->authorization; if (empty($authorization)) { if($isInner){ return json_encode(['code'=>500,'msg'=>'缺少授权信息']); @@ -287,7 +287,7 @@ class MessageController extends BaseController public function getChatroomMessages() { // 获取授权token - $authorization = trim($this->request->header('authorization', $this->authorization)); + $authorization = $this->authorization; if (empty($authorization)) { return errorJson('缺少授权信息'); }