...
|
...
|
@@ -13,7 +13,7 @@ const newModel = require(`${mRoot}/new`); |
|
|
const searchModel = require(`${mRoot}/search`);
|
|
|
const _ = require('lodash');
|
|
|
const helpers = global.yoho.helpers;
|
|
|
const qs = require('querystring');
|
|
|
const listParamsProcess = require(`${utils}/list-params-process`);
|
|
|
|
|
|
const channelToAppChannel = (channel) => {
|
|
|
return {
|
...
|
...
|
@@ -109,12 +109,10 @@ const newGoods = (req, res, next) => { |
|
|
|
|
|
// 301到新路由
|
|
|
const newGoodsRedirect = (req, res) => {
|
|
|
let param = qs.stringify(req.query);
|
|
|
let pathParamsUrl = listParamsProcess.generatePathUrl(req.query, req.path);
|
|
|
let urlPath = _.replace(pathParamsUrl, '//m.yohobuy.com/new', `//m.yohobuy.com/${req.yoho.channel}-new`);
|
|
|
|
|
|
if (param) {
|
|
|
param = '?' + param;
|
|
|
}
|
|
|
res.redirect(301, `/${req.yoho.channel}-new/${param}`);
|
|
|
return res.redirect(301, urlPath);
|
|
|
};
|
|
|
|
|
|
/**
|
...
|
...
|
|