Authored by 姜枫

fix shop search

... ... @@ -160,6 +160,7 @@ const shop = {
limit: 4
};
let shopInfo = shopInfoResult;
let seoResult = listModel.getBrandShopSeo(channel, shopInfoResult, req.query);
/* 基础店铺返回程序内的跳转信号,跳转到基础店铺 */
if (shopInfoResult && shopInfoResult.shop_template_type && parseInt(shopInfoResult.shop_template_type, 10) === 1) {
... ... @@ -204,7 +205,7 @@ const shop = {
let result = listModel.formShopData(shopData, shopId, isApp);
result = _.assign(result, pageHeader);
result = _.assign(result, pageHeader, {shopId: shopId, coverChannel: channel, seoResult: seoResult});
res.render('newshop/shop-classics', {
module: 'product',
... ...
... ... @@ -35,13 +35,12 @@ const list = (req, res, next) => {
return res.redirect(activity);
} else {
// 获取第一页数据做服务端渲染
let initialData = {
query: query,
let initialData = _.assign({
type: 'default',
order: '0',
page: 1,
limit: 6,
};
limit: 6
}, params);
if (query) {
query = query.toLowerCase();
... ...
... ... @@ -963,5 +963,6 @@ module.exports = {
getBrandFavStatus,
getShopDecorator: _getShopDecorator,
getShopCategoryApi: _getShopCategory,
formShopData: _formShopData
formShopData: _formShopData,
getBrandShopSeo: _getBrandShopSeo
};
... ...
... ... @@ -153,6 +153,8 @@ const _searchGoods = (params) => {
params.app_type = 1;
}
console.log(method, params);
return api.get('', _.assign({
method: method
}, params), {
... ...