...
|
...
|
@@ -115,7 +115,7 @@ const list = (req, res, next) => { |
|
|
}),
|
|
|
title: title,
|
|
|
goodList: params,
|
|
|
firstPageGoodsList: result[2] || [],
|
|
|
firstPageGoodsList: result[2].list || [],
|
|
|
pageFooter: true
|
|
|
});
|
|
|
}).catch(next);
|
...
|
...
|
@@ -179,6 +179,12 @@ const search = (req, res, next) => { |
|
|
|
|
|
params.isApp = req.yoho.isApp;
|
|
|
searchModel.getSearchData(params).then((result) => {
|
|
|
|
|
|
if (parseInt(params.page) === 1 && parseInt(params.start) > 0) {
|
|
|
// 首屏渲染时,使用 'start' 参数裁减已渲染数据
|
|
|
result.list = result.list.slice(params.start || 0);
|
|
|
}
|
|
|
|
|
|
if (result.list && result.list.length > 0) {
|
|
|
res.render('search/page', {
|
|
|
layout: false,
|
...
|
...
|
@@ -189,11 +195,6 @@ const search = (req, res, next) => { |
|
|
res.json(result);
|
|
|
}
|
|
|
|
|
|
if (parseInt(params.page) === 1 && parseInt(params.start) > 0) {
|
|
|
// 首屏渲染时,使用 'start' 参数裁减已渲染数据
|
|
|
result = result.slice(params.start || 0);
|
|
|
}
|
|
|
|
|
|
res.render('search/page', {
|
|
|
layout: false,
|
|
|
new: result
|
...
|
...
|
|