优化代码

This commit is contained in:
2020-05-09 17:52:57 +08:00
parent ad7993478a
commit ed35d06208
6 changed files with 64 additions and 47 deletions

View File

@@ -34,11 +34,11 @@ class ApiAuth {
} catch (TokenExpiredException $e) {
$this->data['msg'] = $e->getMessage();
$this->data['code'] = 2001;
return json($this->data)->code($this->data['code']);
return json($this->data);
} catch (JWTException $e) {
$this->data['code'] = 2000;
$this->data['msg'] = $e->getMessage();
return json($this->data)->code($this->data['code']);
return json($this->data);
}
return $next($request);