完善验证码检查

This commit is contained in:
COOL 2024-06-13 09:41:36 +08:00
parent 540cd656f1
commit ef688d340b

View File

@ -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;