From 814e198af25789fea756482c927693158533d715 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Mon, 4 Dec 2023 16:17:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=B8=AD=E5=8F=B0=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/middleware/SignMiddleware.php | 4 ++-- app/controller/middle/Merchant.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/common/middleware/SignMiddleware.php b/app/common/middleware/SignMiddleware.php index 39aad268..7a783ed4 100755 --- a/app/common/middleware/SignMiddleware.php +++ b/app/common/middleware/SignMiddleware.php @@ -72,13 +72,13 @@ class SignMiddleware extends BaseMiddleware { // 验证请求, 10秒钟失效 if (time() - ($data['timestamp'] ?? 0) > 10) { - // throw new AuthException('签名已失效'); + throw new AuthException('签名已失效'); } // 比对签名 $clientSign = $data['sign'] ?? ''; $serverSign = $this->makeSign($data, $appSecret); if ($clientSign != $serverSign) { - // throw new AuthException('签名校验失败'); + throw new AuthException('签名校验失败'); } } } \ No newline at end of file diff --git a/app/controller/middle/Merchant.php b/app/controller/middle/Merchant.php index 65915b29..f03e3fa4 100644 --- a/app/controller/middle/Merchant.php +++ b/app/controller/middle/Merchant.php @@ -5,6 +5,7 @@ use crmeb\basic\BaseController; use think\App; use think\facade\Db; use app\common\repositories\system\merchant\MerchantRepository; +use Overtrue\Pinyin\Pinyin; /** * Class Auth