...
|
...
|
@@ -206,14 +206,13 @@ const shop = { |
|
|
|
|
|
result = _.assign(result, pageHeader);
|
|
|
|
|
|
console.log(result.hotListproductSkn);
|
|
|
res.render('newshop/shop-classics', {
|
|
|
module: 'product',
|
|
|
page: 'shop.classics',
|
|
|
shopIndex: result,
|
|
|
shopHeadHide: true,
|
|
|
gender: req.query.gender,
|
|
|
channel: req.query.channel,
|
|
|
channel: channel,
|
|
|
title: result.seoTitle + '|' + result.seoTitle + '潮流服装服饰-Yoho!Buy有货',
|
|
|
keywords: result.seoTitle + ',' + result.seoTitle + '服装服饰,' + result.seoTitle + '潮流服装服饰',
|
|
|
description: result.seoTitle + '|Yoho!Buy有货' + result.seoTitle + '潮流服饰官方授权店!100%品牌正品保证,支持货到付款。',
|
...
|
...
|
@@ -223,43 +222,21 @@ const shop = { |
|
|
|
|
|
});
|
|
|
}
|
|
|
|
|
|
// if (result.goBrand) {
|
|
|
|
|
|
|
|
|
// } else {
|
|
|
// return listModel.searchProductBySkn(result.hotListproductSkn).then(hotList => {
|
|
|
// result = _.assign(result, pageHeader, {
|
|
|
// hotList: productProcess.processProductList(hotList, {isApp: isApp})
|
|
|
// });
|
|
|
|
|
|
// _.forEach(result.hotList, (value, key) => {
|
|
|
// result.hotList[key].tags = {};
|
|
|
// result.hotList[key].is_soon_sold_out = false;
|
|
|
// result.hotList[key].tags.is_hot = true;
|
|
|
// });
|
|
|
|
|
|
// // 有领券功能,不缓存
|
|
|
// res.set('Cache-Control', 'no-cache');
|
|
|
|
|
|
// res.render('shop/index', {
|
|
|
// module: 'product',
|
|
|
// page: 'shop',
|
|
|
// shopIndex: result,
|
|
|
// shopHeadHide: true,
|
|
|
// gender: req.query.gender,
|
|
|
// channel: req.query.channel,
|
|
|
// title: result.seoTitle + '|' + result.seoTitle + '潮流服装服饰-Yoho!Buy有货',
|
|
|
// keywords: result.seoTitle + ',' + result.seoTitle + '服装服饰,' + result.seoTitle + '潮流服装服饰',
|
|
|
// description: result.seoTitle + '|Yoho!Buy有货' + result.seoTitle + '潮流服饰官方授权店!100%品牌正品保证,支持货到付款。',
|
|
|
// shopId: shopId,
|
|
|
// shopPage: true
|
|
|
// });
|
|
|
|
|
|
// });
|
|
|
// }
|
|
|
}).catch(next);
|
|
|
},
|
|
|
_getUidFromUserAgent(req) {
|
|
|
let userAgent = _.split(req.headers['user-agent'], ';');
|
|
|
let uidString = '';
|
|
|
|
|
|
_.forEach(userAgent, value => {
|
|
|
if (_.startsWith(value, 'uid')) {
|
|
|
uidString = value;
|
|
|
return;
|
|
|
}
|
|
|
});
|
|
|
|
|
|
return _.split(uidString, '=')[1];
|
|
|
},
|
|
|
/**
|
|
|
* TODO TAR 店铺和品牌收藏状态调用新的接口
|
|
|
* 基础模板收藏
|
...
|
...
|
@@ -310,5 +287,23 @@ const shop = { |
|
|
}).catch(next);
|
|
|
}
|
|
|
};
|
|
|
/**
|
|
|
* 从 useragent 获取 uid
|
|
|
* @returns {*}
|
|
|
* @private
|
|
|
*/
|
|
|
const _getUidFromUserAgent = (req) => {
|
|
|
let userAgent = _.split(req.headers['user-agent'], ';');
|
|
|
let uidString = '';
|
|
|
|
|
|
_.forEach(userAgent, value => {
|
|
|
if (_.startsWith(value, 'uid')) {
|
|
|
uidString = value;
|
|
|
return;
|
|
|
}
|
|
|
});
|
|
|
|
|
|
return _.split(uidString, '=')[1];
|
|
|
};
|
|
|
|
|
|
module.exports = shop; |
...
|
...
|
|