application/common/controller/Api.php
@@ -115,6 +115,14 @@ // 检测是否需要验证登录 if (!$this->auth->match($this->noNeedLogin)) { //初始化 if(empty($token)) {//token为空,判断sessionkey $sessionkey= $this->request->server('HTTP_TOKEN', $this->request->request('dfgsessionkey', \think\Cookie::get('dfgsessionkey'))); if(!empty($sessionkey)) {//校验sessionkey } } $this->auth->init($token); //检测是否登录 if (!$this->auth->isLogin()) {