|
@@ -36,7 +36,6 @@ const BUNDLE_PRODUCE = 2; // 量贩 |
|
@@ -36,7 +36,6 @@ const BUNDLE_PRODUCE = 2; // 量贩 |
36
|
const BUNDLE_PACKAGE = 1; // 套餐
|
36
|
const BUNDLE_PACKAGE = 1; // 套餐
|
37
|
const tdk = require('../../../utils/getTDK');
|
37
|
const tdk = require('../../../utils/getTDK');
|
38
|
const productProcess = require('../../../utils/product-process');
|
38
|
const productProcess = require('../../../utils/product-process');
|
39
|
-const Helpers = global.yoho.helpers;
|
|
|
40
|
|
39
|
|
41
|
const _getProductAdditionInfoAsync = (data) => {
|
40
|
const _getProductAdditionInfoAsync = (data) => {
|
42
|
return co(function * () {
|
41
|
return co(function * () {
|
|
@@ -1010,19 +1009,6 @@ const _getIntroInfo = (productSkn, maxSortId, additionalData)=> { |
|
@@ -1010,19 +1009,6 @@ const _getIntroInfo = (productSkn, maxSortId, additionalData)=> { |
1010
|
return result;
|
1009
|
return result;
|
1011
|
};
|
1010
|
};
|
1012
|
|
1011
|
|
1013
|
-// 返回6条推荐关键词页面
|
|
|
1014
|
-const getKeywordsInfo = (keywords) => {
|
|
|
1015
|
- let res = [];
|
|
|
1016
|
-
|
|
|
1017
|
- _.forEach(_.slice(_.shuffle(keywords), 0, 12), val => {
|
|
|
1018
|
- res.push({
|
|
|
1019
|
- url: Helpers.urlFormat(`/chanpin/${val.id}.html`),
|
|
|
1020
|
- keyword: val.keyword
|
|
|
1021
|
- });
|
|
|
1022
|
- });
|
|
|
1023
|
- return res;
|
|
|
1024
|
-};
|
|
|
1025
|
-
|
|
|
1026
|
/**
|
1012
|
/**
|
1027
|
* 获取seo信息
|
1013
|
* 获取seo信息
|
1028
|
*
|
1014
|
*
|
|
@@ -1194,13 +1180,12 @@ const _detailDataPkg = (origin, uid, vipLevel, cookies) => { |
|
@@ -1194,13 +1180,12 @@ const _detailDataPkg = (origin, uid, vipLevel, cookies) => { |
1194
|
let coupon = requestData.coupon;
|
1180
|
let coupon = requestData.coupon;
|
1195
|
let limitedInfo = requestData.limited;
|
1181
|
let limitedInfo = requestData.limited;
|
1196
|
let bundle = requestData.bundle;
|
1182
|
let bundle = requestData.bundle;
|
1197
|
- let recommendKeywords = requestData.recommendKeywords ? JSON.parse(requestData.recommendKeywords) : [];
|
|
|
1198
|
|
1183
|
|
1199
|
// 处理相似商品
|
1184
|
// 处理相似商品
|
1200
|
result.alike = productProcess.processProductList(_.get(requestData, 'alike.data.product_list', ''));
|
1185
|
result.alike = productProcess.processProductList(_.get(requestData, 'alike.data.product_list', ''));
|
1201
|
|
1186
|
|
1202
|
// 推荐关键词页面
|
1187
|
// 推荐关键词页面
|
1203
|
- result.recommendKeywords = getKeywordsInfo(recommendKeywords);
|
1188
|
+ result.recommendKeywords = requestData.recommendKeywords;
|
1204
|
|
1189
|
|
1205
|
// 处理店铺推荐
|
1190
|
// 处理店铺推荐
|
1206
|
result.shopRecommend = productProcess.processProductList(
|
1191
|
result.shopRecommend = productProcess.processProductList(
|