Authored by htoooth

refactor

@@ -1311,6 +1311,7 @@ const getDetailHeader = (pid, uid, isStudent, vipLevel, dataMd5, cookie) => { @@ -1311,6 +1311,7 @@ const getDetailHeader = (pid, uid, isStudent, vipLevel, dataMd5, cookie) => {
1311 }); 1311 });
1312 }; 1312 };
1313 1313
  1314 +// 是否支持退换货,true 支持,false 不支持
1314 const saleReturn = (skn) => { 1315 const saleReturn = (skn) => {
1315 return productAPI.isSupportReturnedSale(skn).then(result => _.get(result, `data.${skn}`, 'N') === 'N' ? 'Y' : 'N'); 1316 return productAPI.isSupportReturnedSale(skn).then(result => _.get(result, `data.${skn}`, 'N') === 'N' ? 'Y' : 'N');
1316 }; 1317 };
@@ -1335,7 +1336,6 @@ const showMainAsync = (data) => { @@ -1335,7 +1336,6 @@ const showMainAsync = (data) => {
1335 let requestData = yield Promise.all([ 1336 let requestData = yield Promise.all([
1336 _getSortNavAsync(productInfo.goodsInfo.smallSortId, data.gender), // 导航 1337 _getSortNavAsync(productInfo.goodsInfo.smallSortId, data.gender), // 导航
1337 HeaderModel.requestHeaderData(data.channel), // 头部数据 1338 HeaderModel.requestHeaderData(data.channel), // 头部数据
1338 - productAPI.isSupportReturnedSale(productInfo.goodsInfo.skn), // 退换货  
1339 _getProductIntroAsync(productInfo.goodsInfo.productId, productInfo.goodsInfo.skn) // 商品详细介绍 1339 _getProductIntroAsync(productInfo.goodsInfo.productId, productInfo.goodsInfo.skn) // 商品详细介绍
1340 ]); 1340 ]);
1341 1341
@@ -1347,7 +1347,7 @@ const showMainAsync = (data) => { @@ -1347,7 +1347,7 @@ const showMainAsync = (data) => {
1347 result.detail = productInfo; 1347 result.detail = productInfo;
1348 1348
1349 // 商品详细介绍 1349 // 商品详细介绍
1350 - let intro = _getIntroInfo(productInfo.goodsInfo.skn, productInfo.goodsInfo.maxSortId, requestData[3]); 1350 + let intro = _getIntroInfo(productInfo.goodsInfo.skn, productInfo.goodsInfo.maxSortId, requestData[2]);
1351 1351
1352 result.deatil = Object.assign(result.detail, intro); 1352 result.deatil = Object.assign(result.detail, intro);
1353 1353
@@ -1365,10 +1365,6 @@ const showMainAsync = (data) => { @@ -1365,10 +1365,6 @@ const showMainAsync = (data) => {
1365 productInfo.statGoodsInfo 1365 productInfo.statGoodsInfo
1366 ); 1366 );
1367 1367
1368 - // 是否支持退换货,true 支持,false 不支持  
1369 - result.detail.supportSaleReturnedService =  
1370 - _.get(requestData[2], `data.${productInfo.goodsInfo.skn}`, 'N') === 'N';  
1371 -  
1372 // 面包屑导航 1368 // 面包屑导航
1373 result.detail.pathNav = _.concat( 1369 result.detail.pathNav = _.concat(
1374 homeService.getHomeChannelNav(data.channel), 1370 homeService.getHomeChannelNav(data.channel),
@@ -1376,7 +1372,6 @@ const showMainAsync = (data) => { @@ -1376,7 +1372,6 @@ const showMainAsync = (data) => {
1376 [{name: productInfo.goodsInfo.name}] 1372 [{name: productInfo.goodsInfo.name}]
1377 ); 1373 );
1378 1374
1379 -  
1380 return result; 1375 return result;
1381 })(); 1376 })();
1382 }; 1377 };