...
|
...
|
@@ -304,11 +304,47 @@ const keyword = (req, res, next) => { |
|
|
}).catch(next);
|
|
|
};
|
|
|
|
|
|
// 关键词页with id
|
|
|
const keyId = (req, res, next) => {
|
|
|
let params = {
|
|
|
isSearch: true, // 搜索列表将最新改成默认的标识
|
|
|
cartUrl: helpers.urlFormat('/cart/index/index')
|
|
|
};
|
|
|
|
|
|
params.isApp = req.yoho.isApp;
|
|
|
params.physical_channel = req.yoho.channel && searchProcess.getChannelType(req.yoho.channel);
|
|
|
|
|
|
return searchModel.getSearchKeywordDataById(req.params.id, params, req.user.uid).then(result => {
|
|
|
let queryKey = result.queryKey;
|
|
|
|
|
|
// 唤起 APP 的路径
|
|
|
res.locals.appPath = `yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.list","params":${JSON.stringify(params)}}`;
|
|
|
|
|
|
res.render('search/list', {
|
|
|
_noLazy: true,
|
|
|
module: 'product',
|
|
|
page: 'search-list',
|
|
|
pageHeader: headerModel.setNav({
|
|
|
navTitle: queryKey
|
|
|
}),
|
|
|
goodList: params,
|
|
|
firstPageGoods: result || [],
|
|
|
fuzzyWord: result.fuzzyWord,
|
|
|
title: `${queryKey}价格_图片_品牌_怎么样-YOHO!BUY有货`,
|
|
|
keywords: `${queryKey},${queryKey}价格,${queryKey}图片,${queryKey}怎么样,${queryKey}品牌,YOHO!BUY有货`,
|
|
|
description: `YOHO!BUY有货网yohobuy.com是国内专业的${queryKey}网上潮流购物商城,为您找到${_.get(result,
|
|
|
'total', 0)}条${queryKey}、产品的详细参数,实时报价,价格行情,图片、评价、品牌等信息。买${queryKey},就上YOHO!BUY有货`,
|
|
|
pageFooter: true
|
|
|
});
|
|
|
}).catch(next);
|
|
|
};
|
|
|
|
|
|
module.exports = {
|
|
|
list,
|
|
|
filter,
|
|
|
search,
|
|
|
index,
|
|
|
fuzzyDatas,
|
|
|
keyword
|
|
|
keyword,
|
|
|
keyId
|
|
|
}; |
...
|
...
|
|