...
|
...
|
@@ -331,8 +331,11 @@ const listNew = (req, res, next) => { |
|
|
if (uid) {
|
|
|
initialData.uid = uid;
|
|
|
}
|
|
|
|
|
|
let searchParams = searchProcess.getSearchParamsWithoutMethod(initialData);
|
|
|
|
|
|
co(function* () {
|
|
|
let result = yield req.ctx(searchModel).getCategoryGoods(initialData);
|
|
|
let result = yield req.ctx(searchModel).getCategoryGoods(searchParams);
|
|
|
let categoryIntroRedis = [];
|
|
|
|
|
|
let responseResult = {
|
...
|
...
|
@@ -390,7 +393,7 @@ const listNew = (req, res, next) => { |
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 品类落地页异步获取商品数据
|
|
|
* SEO 友好的品类落地页异步获取商品数据
|
|
|
*/
|
|
|
const getCategoryGoods = (req, res, next) => {
|
|
|
let allowOrigin = _.get(req, 'headers.origin', null) ?
|
...
|
...
|
@@ -413,7 +416,9 @@ const getCategoryGoods = (req, res, next) => { |
|
|
params.isApp = req.yoho.isApp;
|
|
|
params.limit = 24;
|
|
|
|
|
|
req.ctx(searchModel).getCategoryGoods(params).then((result) => {
|
|
|
let searchParams = searchProcess.getSearchParamsWithoutMethod(params);
|
|
|
|
|
|
req.ctx(searchModel).getCategoryGoods(searchParams).then((result) => {
|
|
|
if (result.data.product_list && result.data.product_list.length > 0) {
|
|
|
|
|
|
let product_list = productProcess.processProductList(result.data.product_list || [], {
|
...
|
...
|
|