...
|
...
|
@@ -36,7 +36,6 @@ const BUNDLE_PRODUCE = 2; // 量贩 |
|
|
const BUNDLE_PACKAGE = 1; // 套餐
|
|
|
const tdk = require('../../../utils/getTDK');
|
|
|
const productProcess = require('../../../utils/product-process');
|
|
|
const Helpers = global.yoho.helpers;
|
|
|
|
|
|
const _getProductAdditionInfoAsync = (data) => {
|
|
|
return co(function * () {
|
...
|
...
|
@@ -1010,19 +1009,6 @@ const _getIntroInfo = (productSkn, maxSortId, additionalData)=> { |
|
|
return result;
|
|
|
};
|
|
|
|
|
|
// 返回6条推荐关键词页面
|
|
|
const getKeywordsInfo = (keywords) => {
|
|
|
let res = [];
|
|
|
|
|
|
_.forEach(_.slice(_.shuffle(keywords), 0, 12), val => {
|
|
|
res.push({
|
|
|
url: Helpers.urlFormat(`/chanpin/${val.id}.html`),
|
|
|
keyword: val.keyword
|
|
|
});
|
|
|
});
|
|
|
return res;
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 获取seo信息
|
|
|
*
|
...
|
...
|
@@ -1194,13 +1180,12 @@ const _detailDataPkg = (origin, uid, vipLevel, cookies) => { |
|
|
let coupon = requestData.coupon;
|
|
|
let limitedInfo = requestData.limited;
|
|
|
let bundle = requestData.bundle;
|
|
|
let recommendKeywords = requestData.recommendKeywords ? JSON.parse(requestData.recommendKeywords) : [];
|
|
|
|
|
|
// 处理相似商品
|
|
|
result.alike = productProcess.processProductList(_.get(requestData, 'alike.data.product_list', ''));
|
|
|
|
|
|
// 推荐关键词页面
|
|
|
result.recommendKeywords = getKeywordsInfo(recommendKeywords);
|
|
|
result.recommendKeywords = requestData.recommendKeywords;
|
|
|
|
|
|
// 处理店铺推荐
|
|
|
result.shopRecommend = productProcess.processProductList(
|
...
|
...
|
|