mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2024-11-01 22:20:30 +08: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…
Reference in New Issue
Block a user