Authored by yyq

disable test sms send limit

@@ -36,6 +36,8 @@ exports.createApp = async(app) => { @@ -36,6 +36,8 @@ exports.createApp = async(app) => {
36 }); 36 });
37 } 37 }
38 38
  39 + app.set('etag', false);
  40 +
39 app.use('/xianyu/node/status.html', (req, res) => { 41 app.use('/xianyu/node/status.html', (req, res) => {
40 res.status(200).end(); 42 res.status(200).end();
41 }); 43 });
@@ -12,6 +12,8 @@ const log = global.yoho.logger; @@ -12,6 +12,8 @@ const log = global.yoho.logger;
12 const sign = global.yoho.sign; 12 const sign = global.yoho.sign;
13 const config = global.yoho.config; 13 const config = global.yoho.config;
14 14
  15 +const isProduction = process.env.NODE_ENV === 'production';
  16 +
15 const loginPage = '//m.yohobuy.com/signin.html'; 17 const loginPage = '//m.yohobuy.com/signin.html';
16 const homePage = `${config.siteUrl}/xianyu/index/channel`; 18 const homePage = `${config.siteUrl}/xianyu/index/channel`;
17 19
@@ -240,6 +242,7 @@ const bind = { @@ -240,6 +242,7 @@ const bind = {
240 let info = bind.getBindThirdInfo(bindCode); 242 let info = bind.getBindThirdInfo(bindCode);
241 243
242 if (info.type === 'taobao') { 244 if (info.type === 'taobao') {
  245 + if (isProduction) {
243 const timeKey = `${config.app}:bindsms:taobao:${info.openId}`; 246 const timeKey = `${config.app}:bindsms:taobao:${info.openId}`;
244 let sendTimes = await redis.getAsync(timeKey); 247 let sendTimes = await redis.getAsync(timeKey);
245 248
@@ -255,6 +258,7 @@ const bind = { @@ -255,6 +258,7 @@ const bind = {
255 } 258 }
256 259
257 redis.setex(timeKey, 60 * 60 * 2, sendTimes); 260 redis.setex(timeKey, 60 * 60 * 2, sendTimes);
  261 + }
258 req.ctx(passportModel).sendTaobaoBindCode(mobile, req.yoho.isAliApp ? 'xianyu' : '').then(res.json).catch(next); 262 req.ctx(passportModel).sendTaobaoBindCode(mobile, req.yoho.isAliApp ? 'xianyu' : '').then(res.json).catch(next);
259 } else { 263 } else {
260 res.json({ 264 res.json({