Commit f9c547a0 authored by Hsinli's avatar Hsinli

addd

parent a083285b
Pipeline #13512 passed with stage
in 5 seconds
...@@ -16,7 +16,7 @@ class SmsService extends Service { ...@@ -16,7 +16,7 @@ class SmsService extends Service {
if (!inputParams.hasOwnProperty('phone') || !inputParams.hasOwnProperty('content')) { if (!inputParams.hasOwnProperty('phone') || !inputParams.hasOwnProperty('content')) {
ctx.failed('手机号/短信内容不能为空'); ctx.failed('手机号/短信内容不能为空');
} }
const url = 'https://lan-nginx.jianbing.com/messages/index'; const url = 'https://b.jianbing.com/messages/index';
const appId = 'cXeKaF53GQgQk55'; const appId = 'cXeKaF53GQgQk55';
const appKey = '276BC440-B67E-44DA-ADC0-944A79F0DAB0'; const appKey = '276BC440-B67E-44DA-ADC0-944A79F0DAB0';
let params = { let params = {
......
...@@ -42,10 +42,11 @@ class ApplyService extends Service { ...@@ -42,10 +42,11 @@ class ApplyService extends Service {
//60秒只能获取一次 //60秒只能获取一次
let lockKey = 'mine:credit:black:lock' + inputParams.phone; let lockKey = 'mine:credit:black:lock' + inputParams.phone;
let lock = app.redis.get(lockKey); let lock = app.redis.get(lockKey);
ctx.logger.info(lock);
if (lock && lock !== null) { if (lock && lock !== null) {
ctx.failed('获取验证码过于频繁,请稍后再试'); ctx.failed('获取验证码过于频繁,请稍后再试');
} }
await app.redis.set('lock', lockKey, 'EX', 60);//60秒锁 await app.redis.set('lock', lockKey, 'EX', 5);//60秒锁
//每日次数限制 //每日次数限制
let timesKey = 'mine:credit:black:times' + inputParams.phone; let timesKey = 'mine:credit:black:times' + inputParams.phone;
......
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