...
|
...
|
@@ -304,7 +304,6 @@ const _getIntroInfo = (productSkn, additionalData)=> { |
|
|
* @return result Object 格式化数据
|
|
|
*/
|
|
|
const _detailDataPkg = (origin) => {
|
|
|
return co(function*() {
|
|
|
if (_.isEmpty(origin) || _.isEmpty(origin)) {
|
|
|
return {};
|
|
|
}
|
...
|
...
|
@@ -354,7 +353,6 @@ const _detailDataPkg = (origin) => { |
|
|
result.colors = skuData.skuGoods;
|
|
|
|
|
|
return result;
|
|
|
})();
|
|
|
};
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -377,13 +375,9 @@ const getProductInfoAsync = (pid) => { |
|
|
}
|
|
|
|
|
|
let productSkn = _.get(productData, 'data.product_skn');
|
|
|
let requestData = yield Promise.all([
|
|
|
_getProductIntroAsync(productSkn), // 商品详细介绍
|
|
|
_detailDataPkg(productData.data) // 商品详细价格
|
|
|
]);
|
|
|
|
|
|
let productDescription = requestData[0];
|
|
|
let productInfo = requestData[1];
|
|
|
let productDescription = yield _getProductIntroAsync(productSkn);
|
|
|
let productInfo = _detailDataPkg(productData.data);
|
|
|
let intro = _getIntroInfo(productSkn, productDescription);
|
|
|
|
|
|
return Object.assign(productInfo, intro);
|
...
|
...
|
@@ -707,7 +701,6 @@ const addToFav = (uid, skuList, hasPromotion, cartDelList) => { |
|
|
* @return array
|
|
|
*/
|
|
|
const checkUserIsFav = (uid, skuList) => {
|
|
|
|
|
|
return co(function * () {
|
|
|
let result = {};
|
|
|
|
...
|
...
|
@@ -724,7 +717,7 @@ const checkUserIsFav = (uid, skuList) => { |
|
|
return result;
|
|
|
}
|
|
|
|
|
|
return cartApi.checkUserIsFavProductList(uid, skuList);
|
|
|
return yield cartApi.checkUserIsFavProductList(uid, skuList);
|
|
|
})();
|
|
|
};
|
|
|
|
...
|
...
|
|