...
|
...
|
@@ -25,6 +25,14 @@ const list = (req, res, next) => { |
|
|
let isQuerySecondClass = false; // 标识用户搜的是不是二级品类
|
|
|
let domain = null;
|
|
|
|
|
|
if (params.query) {
|
|
|
let activity = _.get(searchModel.searchKeyActivity(params.query), 'data.urlobj.appUrl', '');
|
|
|
|
|
|
if (activity) {
|
|
|
res.redirect(activity);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (params.shop_id) {
|
|
|
params.shopId = params.shop_id;
|
|
|
}
|
...
|
...
|
@@ -163,13 +171,6 @@ const search = (req, res, next) => { |
|
|
|
|
|
let params = Object.assign({}, req.query);
|
|
|
|
|
|
if (params.query) {
|
|
|
let activity = _.get(searchModel.searchKeyActivity(params.query), 'data.urlobj.appUrl', '');
|
|
|
|
|
|
if (activity) {
|
|
|
res.redirect(activity);
|
|
|
}
|
|
|
}
|
|
|
searchModel.getSearchData(params).then((result) => {
|
|
|
res.render('search/page', {
|
|
|
layout: false,
|
...
|
...
|
|