...
|
...
|
@@ -162,11 +162,31 @@ const searchRecommend = (req, res, next) => { |
|
|
}).catch(next);
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 搜索少或无 有可能喜欢
|
|
|
**/
|
|
|
const searchLessRecommend = (req, res, next) => {
|
|
|
let channel = req.yoho.channel;
|
|
|
let uid = req.user.uid;
|
|
|
let udid = req.yoho.udid;
|
|
|
let page = Number(req.query.page || 1);
|
|
|
|
|
|
if (page <= 0 || page >= 6) {
|
|
|
page = 1;
|
|
|
}
|
|
|
|
|
|
search.getSearchLessProduct(channel, uid, udid, page).then(result => {
|
|
|
return res.send(result);
|
|
|
}).catch(next);
|
|
|
|
|
|
};
|
|
|
|
|
|
module.exports = {
|
|
|
index,
|
|
|
suggest,
|
|
|
suggest4Old,
|
|
|
searchFilterBrands,
|
|
|
searchHistory, // 搜索历史记录
|
|
|
searchRecommend // 搜索框下方 热门搜索
|
|
|
searchRecommend, // 搜索框下方 热门搜索
|
|
|
searchLessRecommend
|
|
|
}; |
...
|
...
|
|