Commit 8642eee3 authored by Hsinli's avatar Hsinli

add verfi_code valid time

parent 6d906965
Pipeline #14340 passed with stage
in 7 seconds
......@@ -161,7 +161,7 @@ class ApplyService extends Service {
if (times >= 11) {
// ctx.failed('今日获取验证码次数过多,请明日再试');
}
let pexpire = new Date(moment().add(1, 'days').format('YYYY-MM-DD')).getTime();
let pexpire = new Date(moment().add(1, 'days').format('YYYY-MM-DD 00:00:00')).getTime();
let validTime = Number(pexpire) - Number(moment().format('x'));
ctx.logger.info(validTime);
await app.redis.set(timesKey, times, 'PX', validTime);//今日有效
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment