Commit 66290d39 authored by Hsinli's avatar Hsinli

addd

parent a26c7dbf
Pipeline #13697 passed with stage
in 5 seconds
......@@ -126,7 +126,7 @@ class ApplyService extends Service {
name: inputParams.name,
id_card: inputParams.id_card
}
await app.redis.set(codeKey, codeData, 'EX', 60 * 5);//5分钟有效时间
await app.redis.set(codeKey, JSON, stringify(codeData), 'EX', 60 * 5);//5分钟有效时间
let smsParams = {
......@@ -165,6 +165,7 @@ class ApplyService extends Service {
if (codeData === null || !codeData) {
ctx.failed('请先获取验证码');
}
codeData = JSON.parse(codeData);
if (codeData.code !== inputParams.code) {
ctx.failed('验证码错误,请重试');
}
......
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