| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 | 
							- <?php
 
- namespace app\common;
 
- class ErrorCode
 
- {
 
-     
 
-     public static function getError($code)
 
-     {
 
-         $errArr = self::getErrorArr();
 
-         if(!key_exists($code,$errArr)){
 
-             return "未知错误";
 
-         }
 
-         return $errArr[$code];
 
-     }
 
-     
 
-     protected static function getErrorArr()
 
-     {
 
-         return [
 
-             "0" => "成功",
 
-             "9001" => "缺少签名",
 
-             "9002" => "签名不正确",
 
-             "9004" => "请求已过期",
 
-             "9999" => "系统错误",
 
-         ];
 
-     }
 
- }
 
 
  |