...
|
...
|
@@ -14,11 +14,11 @@ const _ = require('lodash'); |
|
|
const library = '../../../library';
|
|
|
const helpers = require(`${library}/helpers`);
|
|
|
|
|
|
const detailAPI = require('./detail-main-api');
|
|
|
const productAPI = require('./detail-product-api');
|
|
|
const commentAPI = require('./detail-comment-api');
|
|
|
const consultAPI = require('./detail-consult-api');
|
|
|
|
|
|
const hotAreaService = require('./detail-hotarea-api');
|
|
|
const hotAreaService = require('./detail-hotarea-service');
|
|
|
const brandService = require('./brand-service');
|
|
|
const favoriteBrandService = require('./favorite-brand-service');
|
|
|
const favoriteProductService = require('./favorite-product-service');
|
...
|
...
|
@@ -48,11 +48,11 @@ const setMultiResourceByProductBaseInfo = (data) => { |
|
|
// 获取相关url
|
|
|
|
|
|
let result = yield Promise.all([
|
|
|
detailAPI.getProductBannerAsync(productId, 'web', isOnlyUrl),
|
|
|
detailAPI.sizeInfoAsync(skn, isOnlyUrl),
|
|
|
detailAPI.getProductComfortAsync(productId, isOnlyUrl),
|
|
|
detailAPI.getProductModelCardAsync(productId, isOnlyUrl),
|
|
|
detailAPI.getProductModelTryAsync(skn, isOnlyUrl),
|
|
|
productAPI.getProductBannerAsync(productId, 'web', isOnlyUrl),
|
|
|
productAPI.sizeInfoAsync(skn, isOnlyUrl),
|
|
|
productAPI.getProductComfortAsync(productId, isOnlyUrl),
|
|
|
productAPI.getProductModelCardAsync(productId, isOnlyUrl),
|
|
|
productAPI.getProductModelTryAsync(skn, isOnlyUrl),
|
|
|
brandService.getBannerInfoAsync(brandId, isOnlyUrl)
|
|
|
]);
|
|
|
|
...
|
...
|
@@ -192,7 +192,7 @@ function getProductActivityBannerAsync(pid) { |
|
|
let data = getMultiDataByResourceName('ItemData::getProductBanner');
|
|
|
|
|
|
if (!data) {
|
|
|
data = yield detailAPI.getProductBannerAsync(pid);
|
|
|
data = yield productAPI.getProductBannerAsync(pid);
|
|
|
}
|
|
|
|
|
|
if (data.code && data.code === 200 && data.data) {
|
...
|
...
|
@@ -1026,7 +1026,7 @@ function getProductModelCardAsync(productId) { |
|
|
let data = getMultiDataByResourceName('ItemData::getProductModelCard');
|
|
|
|
|
|
if (!data) {
|
|
|
data = yield detailAPI.getProductModelCardAsync(productId);
|
|
|
data = yield productAPI.getProductModelCardAsync(productId);
|
|
|
}
|
|
|
|
|
|
if (data.code && data.code === 200) {
|
...
|
...
|
@@ -1168,7 +1168,7 @@ function getProductModelTryAsync(productSkn) { |
|
|
let result = getMultiDataByResourceName('ItemData::getProductModelTry');
|
|
|
|
|
|
if (!result) {
|
|
|
result = yield detailAPI.getProductModelTryAsync(productSkn);
|
|
|
result = yield productAPI.getProductModelTryAsync(productSkn);
|
|
|
}
|
|
|
|
|
|
if (result.code && result.code === 200 && result.data) {
|
...
|
...
|
@@ -1287,7 +1287,7 @@ const getSizeInfoAsync = (productSkn, maxSortId)=> { |
|
|
|
|
|
if (!sizeInfo) {
|
|
|
// 获取尺码
|
|
|
sizeInfo = yield detailAPI.sizeInfoAsync(productSkn);
|
|
|
sizeInfo = yield productAPI.sizeInfoAsync(productSkn);
|
|
|
}
|
|
|
|
|
|
if (!sizeInfo) {
|
...
|
...
|
@@ -1407,7 +1407,7 @@ module.exports.showMainAsync = (data) => { |
|
|
return co(function * () {
|
|
|
|
|
|
// 获取商品信息
|
|
|
let productInfo = yield detailAPI.getProductInfo(data.id);
|
|
|
let productInfo = yield productAPI.getProductInfo(data.id);
|
|
|
|
|
|
productInfo = yield detailDataPkg(productInfo, data.uid, data.vipLevel);
|
|
|
|
...
|
...
|
|