Authored by htoooth

refactor

@@ -448,41 +448,41 @@ const getFashionTopGoodsStatus = (uid, showStatus, isBeginSale) => { @@ -448,41 +448,41 @@ const getFashionTopGoodsStatus = (uid, showStatus, isBeginSale) => {
448 // 显示获取限购码按钮 448 // 显示获取限购码按钮
449 switch (showStatus) { 449 switch (showStatus) {
450 case 1: // 开售前/后,立即分享获得限购码(用户未领取限购码) 450 case 1: // 开售前/后,立即分享获得限购码(用户未领取限购码)
451 - {  
452 - if (isBeginSale) { 451 + {
  452 + if (isBeginSale) {
  453 + result.buyNow = true;
  454 + result.dis = true;
  455 + } else {
  456 + result.openSoon = true;
  457 + result.hasLimitedCode = false;
  458 + }
  459 + break;
  460 + }
  461 + case 2: // 开售后,限购码已抢光(用户未领取限购码)
  462 + {
453 result.buyNow = true; 463 result.buyNow = true;
454 result.dis = true; 464 result.dis = true;
455 - } else {  
456 - result.openSoon = true; 465 + result.limitedCodeSoldOut = true;
  466 + result.getLimitedCode = false;
457 result.hasLimitedCode = false; 467 result.hasLimitedCode = false;
  468 + break;
458 } 469 }
459 - break;  
460 - }  
461 - case 2: // 开售后,限购码已抢光(用户未领取限购码)  
462 - {  
463 - result.buyNow = true;  
464 - result.dis = true;  
465 - result.limitedCodeSoldOut = true;  
466 - result.getLimitedCode = false;  
467 - result.hasLimitedCode = false;  
468 - break;  
469 - }  
470 case 3: // 开售后,商品已经售罄 470 case 3: // 开售后,商品已经售罄
471 - {  
472 - result.soldOut = true;  
473 - result.getLimitedCode = false;  
474 - break;  
475 - } 471 + {
  472 + result.soldOut = true;
  473 + result.getLimitedCode = false;
  474 + break;
  475 + }
476 case 4:// 开售后,立即购买(用户已领取限购码) 476 case 4:// 开售后,立即购买(用户已领取限购码)
477 - {  
478 - result.buyNow = true;  
479 - result.dis = false;  
480 - result.hasLimitedCode = true;  
481 - if (uid) { // 限购码失效  
482 - result.getLimitedCodeDis = true; 477 + {
  478 + result.buyNow = true;
  479 + result.dis = false;
  480 + result.hasLimitedCode = true;
  481 + if (uid) { // 限购码失效
  482 + result.getLimitedCodeDis = true;
  483 + }
  484 + break;
483 } 485 }
484 - break;  
485 - }  
486 case 5: // 开售前,限购码已被抢光(用户未领取限购码) 486 case 5: // 开售前,限购码已被抢光(用户未领取限购码)
487 result.openSoon = true; 487 result.openSoon = true;
488 result.hasLimitedCode = true; 488 result.hasLimitedCode = true;
@@ -751,19 +751,19 @@ const detailDataPkg = (origin, uid, vipLevel) => { @@ -751,19 +751,19 @@ const detailDataPkg = (origin, uid, vipLevel) => {
751 if (domainBrand.type && domainBrand.shopId) { 751 if (domainBrand.type && domainBrand.shopId) {
752 switch (parseInt(domainBrand.type)) { 752 switch (parseInt(domainBrand.type)) {
753 case 1: 753 case 1:
754 - { 754 + {
755 // 多品店不显示 755 // 多品店不显示
756 - banner = [];  
757 - break;  
758 - } 756 + banner = [];
  757 + break;
  758 + }
759 case 2: 759 case 2:
760 - { 760 + {
761 // TODO:单品店显示新版的店铺banner,item.php 210 761 // TODO:单品店显示新版的店铺banner,item.php 210
762 - let basisData = shopAPI.basisTemplateAsync(domainBrand.shopId); 762 + let basisData = shopAPI.basisTemplateAsync(domainBrand.shopId);
763 763
764 - banner.bgImg = basisData.shopTopBanner.banner || banner.bgImg;  
765 - break;  
766 - } 764 + banner.bgImg = basisData.shopTopBanner.banner || banner.bgImg;
  765 + break;
  766 + }
767 767
768 } 768 }
769 } 769 }
@@ -842,15 +842,15 @@ function getDescriptionDataBySizeInfoAsync(sizeInfo) { @@ -842,15 +842,15 @@ function getDescriptionDataBySizeInfoAsync(sizeInfo) {
842 842
843 switch (sizeInfo.productDescBo.gender) { 843 switch (sizeInfo.productDescBo.gender) {
844 case 1: 844 case 1:
845 - {  
846 - sex = '男款';  
847 - break;  
848 - } 845 + {
  846 + sex = '男款';
  847 + break;
  848 + }
849 case 2: 849 case 2:
850 - {  
851 - sex = '女款';  
852 - break;  
853 - } 850 + {
  851 + sex = '女款';
  852 + break;
  853 + }
854 } 854 }
855 855
856 description.basic = []; 856 description.basic = [];
@@ -1216,25 +1216,25 @@ function getSizeAttrByMaxSortId(maxSortId, sizeList) { @@ -1216,25 +1216,25 @@ function getSizeAttrByMaxSortId(maxSortId, sizeList) {
1216 switch (maxSortId) { 1216 switch (maxSortId) {
1217 case 1: 1217 case 1:
1218 case 2: 1218 case 2:
1219 - {  
1220 - attributeIds = [3, 4];  
1221 - break;  
1222 - } 1219 + {
  1220 + attributeIds = [3, 4];
  1221 + break;
  1222 + }
1223 1223
1224 case 3: 1224 case 3:
1225 - {  
1226 - attributeIds = [6, 10];  
1227 - break;  
1228 - } 1225 + {
  1226 + attributeIds = [6, 10];
  1227 + break;
  1228 + }
1229 case 6: 1229 case 6:
1230 - {  
1231 - attributeIds = [13];  
1232 - break;  
1233 - } 1230 + {
  1231 + attributeIds = [13];
  1232 + break;
  1233 + }
1234 default: 1234 default:
1235 - {  
1236 - attributeIds = [];  
1237 - } 1235 + {
  1236 + attributeIds = [];
  1237 + }
1238 } 1238 }
1239 1239
1240 let sizeInfos = []; 1240 let sizeInfos = [];