mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2025-12-14 11:12:51 +00:00
完善验证码检查
This commit is contained in:
parent
540cd656f1
commit
ef688d340b
@ -74,7 +74,7 @@ export class UserSmsService extends BaseService {
|
|||||||
*/
|
*/
|
||||||
async checkCode(phone, code) {
|
async checkCode(phone, code) {
|
||||||
const cacheCode = await this.midwayCache.get(`sms:${phone}`);
|
const cacheCode = await this.midwayCache.get(`sms:${phone}`);
|
||||||
if (cacheCode == code) {
|
if (code && cacheCode == code) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user