...
|
...
|
@@ -11,6 +11,7 @@ const searchModel = require(`${mRoot}/search`); |
|
|
const headerModel = require('../../../doraemon/models/header');
|
|
|
const _ = require('lodash');
|
|
|
const helpers = global.yoho.helpers;
|
|
|
const productProcess = require(`${utils}/product-process`);
|
|
|
|
|
|
const shop = {
|
|
|
index(req, res, next) {
|
...
|
...
|
@@ -204,6 +205,8 @@ const shop = { |
|
|
let result = listModel.formShopData(shopData, shopId, isApp);
|
|
|
|
|
|
result = _.assign(result, pageHeader);
|
|
|
|
|
|
console.log(result.hotListproductSkn);
|
|
|
res.render('newshop/shop-classics', {
|
|
|
module: 'product',
|
|
|
page: 'shop.classics',
|
...
|
...
|
@@ -290,6 +293,22 @@ const shop = { |
|
|
res.json(result2);
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
shopHotList(req, res, next) {
|
|
|
let skns = req.query.skns;
|
|
|
return listModel.searchProductBySkn(skns).then(hotList => {
|
|
|
hotList = productProcess.processProductList(hotList, {isApp: req.yoho.isApp});
|
|
|
_.forEach(hotList, (value, key) => {
|
|
|
hotList[key].tags = {};
|
|
|
hotList[key].is_soon_sold_out = false;
|
|
|
hotList[key].tags.is_hot = true;
|
|
|
});
|
|
|
res.render('newshop/shop-hotlist', {
|
|
|
hotList: hotList,
|
|
|
layout: false,
|
|
|
_noLazy: true
|
|
|
});
|
|
|
}).catch(next);
|
|
|
}
|
|
|
};
|
|
|
/**
|
...
|
...
|
|