代码优化
This commit is contained in:
@@ -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('缺少授权信息');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user