| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 | 
							- <?php
 
- declare (strict_types=1);
 
- namespace app\admin\middleware;
 
- use Closure;
 
- use app\Request;
 
- use think\exception\HttpResponseException;
 
- use think\facade\Db;
 
- use think\Response;
 
- class Auth
 
- {
 
-     protected static int $CODE_SUCCESS = 0; 
 
-     protected static int $CODE_ERR = 999; 
 
-     
 
-     public function handle(Request $request, Closure $next): mixed
 
-     {
 
-         
 
-        
 
-         return $next($request);
 
-     }
 
-     
 
-     private static function getError($code): string
 
-     {
 
-         $errArr = self::getErrorArr();
 
-         if (!key_exists($code, $errArr)) {
 
-             return "未知错误";
 
-         }
 
-         return $errArr[$code];
 
-     }
 
-     
 
-     private static function getErrorArr(): array
 
-     {
 
-         return [
 
-             self::$CODE_SUCCESS => "成功",
 
-             self::$CODE_ERR => "系统异常",
 
-         ];
 
-     }
 
- }
 
 
  |