|
@@ -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({
|