...
|
...
|
@@ -7,6 +7,7 @@ |
|
|
'use strict';
|
|
|
|
|
|
const indexModel = require('../models/market');
|
|
|
const _ = require('lodash');
|
|
|
|
|
|
exports.index = (req, res, next) => {
|
|
|
|
...
|
...
|
@@ -21,3 +22,26 @@ exports.index = (req, res, next) => { |
|
|
}).catch(next);
|
|
|
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 市场推广活动升级版,自定义下载渠道
|
|
|
* @param req
|
|
|
* @param res
|
|
|
* @param next
|
|
|
*/
|
|
|
exports.v2 = (req, res, next) => {
|
|
|
|
|
|
indexModel.index({
|
|
|
|
|
|
}).then((result) => {
|
|
|
if (_.has(result, 'download[0].url') && req.query.union_type) {
|
|
|
result.download[0].url = result.download[0].url.split('?')[0] +
|
|
|
'?union_type=' + req.query.union_type;
|
|
|
}
|
|
|
res.render('market/market', Object.assign(result, {
|
|
|
title: 'Yoho!Buy 有货'
|
|
|
}));
|
|
|
|
|
|
}).catch(next);
|
|
|
|
|
|
}; |
...
|
...
|
|