diff --git a/app/Request/ApiRequest.php b/app/Request/ApiRequest.php index 82f3c1e..8fcce29 100644 --- a/app/Request/ApiRequest.php +++ b/app/Request/ApiRequest.php @@ -30,12 +30,13 @@ class ApiRequest extends Request } protected function checkSign($params) { - if ($params['timestamp'] < time() - 6000) { - throw new BusinessException('请求已过期'); - } if (!Signer::verify($params, $this->app->app_key)) { throw new BusinessException('验签错误'); } + + if ($params['timestamp'] < time() - 6000) { + throw new BusinessException('请求已过期'); + } } protected function checkApp($appId) {