|
@@ -117,7 +117,8 @@ const list = (req, res, next) => { |
|
@@ -117,7 +117,8 @@ const list = (req, res, next) => { |
117
|
title: title,
|
117
|
title: title,
|
118
|
goodList: params,
|
118
|
goodList: params,
|
119
|
firstPageGoodsList: result[2].list || [],
|
119
|
firstPageGoodsList: result[2].list || [],
|
120
|
- pageFooter: true
|
120
|
+ pageFooter: true,
|
|
|
121
|
+ shopId: params.shop_id || ''
|
121
|
});
|
122
|
});
|
122
|
}).catch(next);
|
123
|
}).catch(next);
|
123
|
}
|
124
|
}
|
|
@@ -182,7 +183,8 @@ const search = (req, res, next) => { |
|
@@ -182,7 +183,8 @@ const search = (req, res, next) => { |
182
|
params.limit = 24;
|
183
|
params.limit = 24;
|
183
|
searchModel.getSearchData(params).then((result) => {
|
184
|
searchModel.getSearchData(params).then((result) => {
|
184
|
|
185
|
|
185
|
- if (result && result.list && parseInt(params.page) === 1 && parseInt(params.start) > 0) {
|
186
|
+ if (result && result.list && result.list.length > params.start &&
|
|
|
187
|
+ parseInt(params.page) === 1 && parseInt(params.start) > 0) {
|
186
|
// 首屏渲染时,使用 'start' 参数裁减已渲染数据
|
188
|
// 首屏渲染时,使用 'start' 参数裁减已渲染数据
|
187
|
result.list = result.list.slice(params.start || 0);
|
189
|
result.list = result.list.slice(params.start || 0);
|
188
|
}
|
190
|
}
|