Authored by 李奇

change: 明星海报sql修改添加

1 /** 1 /**
2 - * 登录判断 2 + * YOHO授权登录
3 * @author: lq 3 * @author: lq
4 * @date: 2017/9/1 4 * @date: 2017/9/1
5 */ 5 */
@@ -9,6 +9,7 @@ const moment = require('moment'); @@ -9,6 +9,7 @@ const moment = require('moment');
9 const authYoho = require('../../utils/authYoho'); 9 const authYoho = require('../../utils/authYoho');
10 const activityModel = require('../models/activity'); 10 const activityModel = require('../models/activity');
11 const queryString = require('queryString'); 11 const queryString = require('queryString');
  12 +const isProd = process.env.NODE_ENV === 'production';
12 13
13 module.exports = (req, res, next) => { 14 module.exports = (req, res, next) => {
14 const actId = req.query.actId; 15 const actId = req.query.actId;
@@ -21,9 +22,9 @@ module.exports = (req, res, next) => { @@ -21,9 +22,9 @@ module.exports = (req, res, next) => {
21 22
22 if (!yhAuthId) { 23 if (!yhAuthId) {
23 let params = { 24 let params = {
24 - yh_backurl: 'http://action.yoho.cn/passport/yohoAuth',  
25 yh_type: 'activity', 25 yh_type: 'activity',
26 - yh_time: moment(new Date()).format('YYYY-MM-DD HH:mm:ss') 26 + yh_time: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
  27 + yh_backurl: `${isProd ? 'https' : 'http'}://action.yoho.cn/passport/yohoAuth`
27 }; 28 };
28 29
29 params.yh_sign = authYoho.sign(params); 30 params.yh_sign = authYoho.sign(params);
  1 +/*
  2 + 明星海报活动修改
  3 + @author: liqi <qi.li@yoho.cn>
  4 + @date: 2017-09-04 18:31:50
  5 +*/
  6 +#注意:GO;分割执行块
  7 +ALTER TABLE activity
  8 + ADD `auth_type` TINYINT NOT NULL DEFAULT 0; # 无鉴权:0 平台内鉴权:1 YOHO H5鉴权: 2
1 -module.exports = ['_migration']; 1 +module.exports = ['_migration', '20170904183150'];