From ef688d340bf01ae7aee62c07e825fac17747c320 Mon Sep 17 00:00:00 2001 From: COOL Date: Thu, 13 Jun 2024 09:41:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E9=AA=8C=E8=AF=81=E7=A0=81?= =?UTF-8?q?=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/user/service/sms.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/user/service/sms.ts b/src/modules/user/service/sms.ts index ca774bf..47a22cf 100644 --- a/src/modules/user/service/sms.ts +++ b/src/modules/user/service/sms.ts @@ -74,7 +74,7 @@ export class UserSmsService extends BaseService { */ async checkCode(phone, code) { const cacheCode = await this.midwayCache.get(`sms:${phone}`); - if (cacheCode == code) { + if (code && cacheCode == code) { return true; } return false;