12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- namespace app\index\controller;
- use app\index\ErrorCode;
- use think\exception\HttpResponseException;
- use think\exception\ValidateException;
- use think\facade\Log;
- use think\Response;
- class Base extends \app\common\controller\Base
- {
- private $apikey = "32a1ff74699ff2d6ce4c497cb94cb5c8";
- protected $checkSignOpen = true;
-
- public function __construct()
- {
- parent::__construct();
- if ($this->checkSignOpen) {
- $checkRes=$this->checkApiSign();
- if($checkRes['code']!==0){
-
- $msg=$checkRes['msg']?$checkRes['msg']:ErrorCode::getError($checkRes['code']);
- $this->error($checkRes['code'],$msg);
- }
- }
- }
- }
|