Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
9052bb8d2a
|
|
@ -49,9 +49,11 @@ class Frontend
|
||||||
// 初始化会员鉴权实例
|
// 初始化会员鉴权实例
|
||||||
$this->auth = Auth::instance();
|
$this->auth = Auth::instance();
|
||||||
$token = request()->header('token');
|
$token = request()->header('token');
|
||||||
if ($token && $needLogin) {
|
if ($token) {
|
||||||
if(!$this->auth->init($token)) {
|
if(request()->controller != 'app\czg\app\controller\LoginController' && request()->action != 'index'){} {
|
||||||
$this->error('Token expiration', [], 401);
|
if(!$this->auth->init($token)) {
|
||||||
|
$this->error('Token expiration', [], 401);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
if ($needLogin) {
|
if ($needLogin) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue