Showing
2 changed files
with
12 additions
and
12 deletions
@@ -14,11 +14,11 @@ const _ = require('lodash'); | @@ -14,11 +14,11 @@ const _ = require('lodash'); | ||
14 | const library = '../../../library'; | 14 | const library = '../../../library'; |
15 | const helpers = require(`${library}/helpers`); | 15 | const helpers = require(`${library}/helpers`); |
16 | 16 | ||
17 | -const detailAPI = require('./detail-main-api'); | 17 | +const productAPI = require('./detail-product-api'); |
18 | const commentAPI = require('./detail-comment-api'); | 18 | const commentAPI = require('./detail-comment-api'); |
19 | const consultAPI = require('./detail-consult-api'); | 19 | const consultAPI = require('./detail-consult-api'); |
20 | 20 | ||
21 | -const hotAreaService = require('./detail-hotarea-api'); | 21 | +const hotAreaService = require('./detail-hotarea-service'); |
22 | const brandService = require('./brand-service'); | 22 | const brandService = require('./brand-service'); |
23 | const favoriteBrandService = require('./favorite-brand-service'); | 23 | const favoriteBrandService = require('./favorite-brand-service'); |
24 | const favoriteProductService = require('./favorite-product-service'); | 24 | const favoriteProductService = require('./favorite-product-service'); |
@@ -48,11 +48,11 @@ const setMultiResourceByProductBaseInfo = (data) => { | @@ -48,11 +48,11 @@ const setMultiResourceByProductBaseInfo = (data) => { | ||
48 | // 获取相关url | 48 | // 获取相关url |
49 | 49 | ||
50 | let result = yield Promise.all([ | 50 | let result = yield Promise.all([ |
51 | - detailAPI.getProductBannerAsync(productId, 'web', isOnlyUrl), | ||
52 | - detailAPI.sizeInfoAsync(skn, isOnlyUrl), | ||
53 | - detailAPI.getProductComfortAsync(productId, isOnlyUrl), | ||
54 | - detailAPI.getProductModelCardAsync(productId, isOnlyUrl), | ||
55 | - detailAPI.getProductModelTryAsync(skn, isOnlyUrl), | 51 | + productAPI.getProductBannerAsync(productId, 'web', isOnlyUrl), |
52 | + productAPI.sizeInfoAsync(skn, isOnlyUrl), | ||
53 | + productAPI.getProductComfortAsync(productId, isOnlyUrl), | ||
54 | + productAPI.getProductModelCardAsync(productId, isOnlyUrl), | ||
55 | + productAPI.getProductModelTryAsync(skn, isOnlyUrl), | ||
56 | brandService.getBannerInfoAsync(brandId, isOnlyUrl) | 56 | brandService.getBannerInfoAsync(brandId, isOnlyUrl) |
57 | ]); | 57 | ]); |
58 | 58 | ||
@@ -192,7 +192,7 @@ function getProductActivityBannerAsync(pid) { | @@ -192,7 +192,7 @@ function getProductActivityBannerAsync(pid) { | ||
192 | let data = getMultiDataByResourceName('ItemData::getProductBanner'); | 192 | let data = getMultiDataByResourceName('ItemData::getProductBanner'); |
193 | 193 | ||
194 | if (!data) { | 194 | if (!data) { |
195 | - data = yield detailAPI.getProductBannerAsync(pid); | 195 | + data = yield productAPI.getProductBannerAsync(pid); |
196 | } | 196 | } |
197 | 197 | ||
198 | if (data.code && data.code === 200 && data.data) { | 198 | if (data.code && data.code === 200 && data.data) { |
@@ -1026,7 +1026,7 @@ function getProductModelCardAsync(productId) { | @@ -1026,7 +1026,7 @@ function getProductModelCardAsync(productId) { | ||
1026 | let data = getMultiDataByResourceName('ItemData::getProductModelCard'); | 1026 | let data = getMultiDataByResourceName('ItemData::getProductModelCard'); |
1027 | 1027 | ||
1028 | if (!data) { | 1028 | if (!data) { |
1029 | - data = yield detailAPI.getProductModelCardAsync(productId); | 1029 | + data = yield productAPI.getProductModelCardAsync(productId); |
1030 | } | 1030 | } |
1031 | 1031 | ||
1032 | if (data.code && data.code === 200) { | 1032 | if (data.code && data.code === 200) { |
@@ -1168,7 +1168,7 @@ function getProductModelTryAsync(productSkn) { | @@ -1168,7 +1168,7 @@ function getProductModelTryAsync(productSkn) { | ||
1168 | let result = getMultiDataByResourceName('ItemData::getProductModelTry'); | 1168 | let result = getMultiDataByResourceName('ItemData::getProductModelTry'); |
1169 | 1169 | ||
1170 | if (!result) { | 1170 | if (!result) { |
1171 | - result = yield detailAPI.getProductModelTryAsync(productSkn); | 1171 | + result = yield productAPI.getProductModelTryAsync(productSkn); |
1172 | } | 1172 | } |
1173 | 1173 | ||
1174 | if (result.code && result.code === 200 && result.data) { | 1174 | if (result.code && result.code === 200 && result.data) { |
@@ -1287,7 +1287,7 @@ const getSizeInfoAsync = (productSkn, maxSortId)=> { | @@ -1287,7 +1287,7 @@ const getSizeInfoAsync = (productSkn, maxSortId)=> { | ||
1287 | 1287 | ||
1288 | if (!sizeInfo) { | 1288 | if (!sizeInfo) { |
1289 | // 获取尺码 | 1289 | // 获取尺码 |
1290 | - sizeInfo = yield detailAPI.sizeInfoAsync(productSkn); | 1290 | + sizeInfo = yield productAPI.sizeInfoAsync(productSkn); |
1291 | } | 1291 | } |
1292 | 1292 | ||
1293 | if (!sizeInfo) { | 1293 | if (!sizeInfo) { |
@@ -1407,7 +1407,7 @@ module.exports.showMainAsync = (data) => { | @@ -1407,7 +1407,7 @@ module.exports.showMainAsync = (data) => { | ||
1407 | return co(function * () { | 1407 | return co(function * () { |
1408 | 1408 | ||
1409 | // 获取商品信息 | 1409 | // 获取商品信息 |
1410 | - let productInfo = yield detailAPI.getProductInfo(data.id); | 1410 | + let productInfo = yield productAPI.getProductInfo(data.id); |
1411 | 1411 | ||
1412 | productInfo = yield detailDataPkg(productInfo, data.uid, data.vipLevel); | 1412 | productInfo = yield detailDataPkg(productInfo, data.uid, data.vipLevel); |
1413 | 1413 |
-
Please register or login to post a comment