Authored by 毕凯

环境变量修改

... ... @@ -25,6 +25,7 @@ var config = require('./config');
// 向模板注入变量
app.locals.devEnv = app.get('env') === 'development';
app.locals.proEnv = app.get('env') === 'production';
app.locals.assetsUrl = config.assetsUrl;
app.set('trust proxy', ['loopback', 'linklocal', 'uniquelocal']);
... ...
... ... @@ -27,9 +27,9 @@ exports.first = (req, res) => {
};
var uid = cookie.getUid(req);
var couponId = res.app.locals.devEnv ? '12463,12461,12459' : '204,552,045,720,459';
var couponId = res.app.locals.proEnv ? '204,552,045,720,459' : '12463,12461,12459';
renderData.activityId = res.app.locals.devEnv ? 499 : 564;
renderData.activityId = res.app.locals.proEnv ? 564 : 499;
couponModel({
uid: uid,
... ...