|
@@ -31,7 +31,7 @@ const BLANK_STR = ' '; |
|
@@ -31,7 +31,7 @@ const BLANK_STR = ' '; |
31
|
const cachedRequestData = {};
|
31
|
const cachedRequestData = {};
|
32
|
|
32
|
|
33
|
// 展览票
|
33
|
// 展览票
|
34
|
-const EXHIBITION_TICKET = 512579596;
|
34
|
+const EXHIBITION_TICKET = 51335912;
|
35
|
|
35
|
|
36
|
const _getProductAdditionInfoAsync = (data) => {
|
36
|
const _getProductAdditionInfoAsync = (data) => {
|
37
|
return co(function * () {
|
37
|
return co(function * () {
|
|
@@ -381,19 +381,19 @@ const _getSkuDataByProductBaseInfo = (data) => { |
|
@@ -381,19 +381,19 @@ const _getSkuDataByProductBaseInfo = (data) => { |
381
|
goodsGroup.size.push({
|
381
|
goodsGroup.size.push({
|
382
|
name: size.sizeName,
|
382
|
name: size.sizeName,
|
383
|
sku: size.goodsSizeSkuId,
|
383
|
sku: size.goodsSizeSkuId,
|
384
|
- num: parseInt(size.goodsSizeStorageNum, 10),
|
384
|
+ num: parseInt(size.goodsSizeStorageNum),
|
385
|
goodsId: size.goodsId
|
385
|
goodsId: size.goodsId
|
386
|
});
|
386
|
});
|
387
|
|
387
|
|
388
|
// 单个sku商品的总数
|
388
|
// 单个sku商品的总数
|
389
|
- goodsGroup.total += parseInt(size.goodsSizeStorageNum, 10);
|
389
|
+ goodsGroup.total += parseInt(size.goodsSizeStorageNum);
|
390
|
|
390
|
|
391
|
if (goodsGroup.total > 0 && !chooseSkuFlag) { // 默认选中该sku商品
|
391
|
if (goodsGroup.total > 0 && !chooseSkuFlag) { // 默认选中该sku商品
|
392
|
goodsGroup.focus = true;
|
392
|
goodsGroup.focus = true;
|
393
|
chooseSkuFlag = true;// 选中sku商品
|
393
|
chooseSkuFlag = true;// 选中sku商品
|
394
|
}
|
394
|
}
|
395
|
|
395
|
|
396
|
- totalStorageNum += parseInt(size.goodsSizeStorageNum, 10);
|
396
|
+ totalStorageNum += parseInt(size.goodsSizeStorageNum);
|
397
|
|
397
|
|
398
|
});
|
398
|
});
|
399
|
|
399
|
|
|
@@ -423,14 +423,14 @@ const _getSkuDataByProductBaseInfo = (data) => { |
|
@@ -423,14 +423,14 @@ const _getSkuDataByProductBaseInfo = (data) => { |
423
|
const _getFashionTopGoodsStatus = (uid, showStatus, isBeginSale) => {
|
423
|
const _getFashionTopGoodsStatus = (uid, showStatus, isBeginSale) => {
|
424
|
// 潮流尖货状态
|
424
|
// 潮流尖货状态
|
425
|
// getLimitedCode //限购码状态
|
425
|
// getLimitedCode //限购码状态
|
426
|
- // hasLimitedCode //是否已经获取限购码
|
426
|
+ // hadLimitedCode //是否已经获取限购码
|
427
|
// limitedCodeSoldOut //限购码是否已经抢光
|
427
|
// limitedCodeSoldOut //限购码是否已经抢光
|
428
|
// openSoon//即将开售
|
428
|
// openSoon//即将开售
|
429
|
// dis //失效
|
429
|
// dis //失效
|
430
|
// buyNow //是否立即购买
|
430
|
// buyNow //是否立即购买
|
431
|
let result = {
|
431
|
let result = {
|
432
|
getLimitedCode: true,
|
432
|
getLimitedCode: true,
|
433
|
- hasLimitedCode: false,
|
433
|
+ hadLimitedCode: false,
|
434
|
limitedCodeSoldOut: false,
|
434
|
limitedCodeSoldOut: false,
|
435
|
openSoon: false,
|
435
|
openSoon: false,
|
436
|
dis: false,
|
436
|
dis: false,
|
|
@@ -447,7 +447,7 @@ const _getFashionTopGoodsStatus = (uid, showStatus, isBeginSale) => { |
|
@@ -447,7 +447,7 @@ const _getFashionTopGoodsStatus = (uid, showStatus, isBeginSale) => { |
447
|
result.dis = true;
|
447
|
result.dis = true;
|
448
|
} else {
|
448
|
} else {
|
449
|
result.openSoon = true;
|
449
|
result.openSoon = true;
|
450
|
- result.hasLimitedCode = false;
|
450
|
+ result.hadLimitedCode = false;
|
451
|
}
|
451
|
}
|
452
|
break;
|
452
|
break;
|
453
|
case 2: // 开售后,限购码已抢光(用户未领取限购码)
|
453
|
case 2: // 开售后,限购码已抢光(用户未领取限购码)
|
|
@@ -455,7 +455,7 @@ const _getFashionTopGoodsStatus = (uid, showStatus, isBeginSale) => { |
|
@@ -455,7 +455,7 @@ const _getFashionTopGoodsStatus = (uid, showStatus, isBeginSale) => { |
455
|
result.dis = true;
|
455
|
result.dis = true;
|
456
|
result.limitedCodeSoldOut = true;
|
456
|
result.limitedCodeSoldOut = true;
|
457
|
result.getLimitedCode = false;
|
457
|
result.getLimitedCode = false;
|
458
|
- result.hasLimitedCode = false;
|
458
|
+ result.hadLimitedCode = false;
|
459
|
break;
|
459
|
break;
|
460
|
case 3: // 开售后,商品已经售罄
|
460
|
case 3: // 开售后,商品已经售罄
|
461
|
result.soldOut = true;
|
461
|
result.soldOut = true;
|
|
@@ -464,20 +464,20 @@ const _getFashionTopGoodsStatus = (uid, showStatus, isBeginSale) => { |
|
@@ -464,20 +464,20 @@ const _getFashionTopGoodsStatus = (uid, showStatus, isBeginSale) => { |
464
|
case 4:// 开售后,立即购买(用户已领取限购码)
|
464
|
case 4:// 开售后,立即购买(用户已领取限购码)
|
465
|
result.buyNow = true;
|
465
|
result.buyNow = true;
|
466
|
result.dis = false;
|
466
|
result.dis = false;
|
467
|
- result.hasLimitedCode = true;
|
467
|
+ result.hadLimitedCode = true;
|
468
|
if (uid) { // 限购码失效
|
468
|
if (uid) { // 限购码失效
|
469
|
result.getLimitedCodeDis = true;
|
469
|
result.getLimitedCodeDis = true;
|
470
|
}
|
470
|
}
|
471
|
break;
|
471
|
break;
|
472
|
case 5: // 开售前,限购码已被抢光(用户未领取限购码)
|
472
|
case 5: // 开售前,限购码已被抢光(用户未领取限购码)
|
473
|
result.openSoon = true;
|
473
|
result.openSoon = true;
|
474
|
- result.hasLimitedCode = true;
|
474
|
+ result.hadLimitedCode = true;
|
475
|
result.limitedCodeSoldOut = true;
|
475
|
result.limitedCodeSoldOut = true;
|
476
|
result.getLimitedCode = false;
|
476
|
result.getLimitedCode = false;
|
477
|
break;
|
477
|
break;
|
478
|
case 6: // 开售前,即将开售(用户已领取限购码)
|
478
|
case 6: // 开售前,即将开售(用户已领取限购码)
|
479
|
result.openSoon = true;
|
479
|
result.openSoon = true;
|
480
|
- result.hasLimitedCode = true;
|
480
|
+ result.hadLimitedCode = true;
|
481
|
if (uid) { // 限购码失效
|
481
|
if (uid) { // 限购码失效
|
482
|
result.getLimitedCodeDis = true;
|
482
|
result.getLimitedCodeDis = true;
|
483
|
}
|
483
|
}
|
|
@@ -485,7 +485,7 @@ const _getFashionTopGoodsStatus = (uid, showStatus, isBeginSale) => { |
|
@@ -485,7 +485,7 @@ const _getFashionTopGoodsStatus = (uid, showStatus, isBeginSale) => { |
485
|
case 7: // 开售后,用户已经用获得的限购码购买过商品
|
485
|
case 7: // 开售后,用户已经用获得的限购码购买过商品
|
486
|
result.buyNow = true;
|
486
|
result.buyNow = true;
|
487
|
result.dis = true;
|
487
|
result.dis = true;
|
488
|
- result.hasLimitedCode = true;
|
488
|
+ result.hadLimitedCode = true;
|
489
|
if (uid) { // 限购码失效
|
489
|
if (uid) { // 限购码失效
|
490
|
result.getLimitedCodeDis = true;
|
490
|
result.getLimitedCodeDis = true;
|
491
|
}
|
491
|
}
|
|
@@ -571,7 +571,7 @@ const _detailDataPkg = (origin, uid, vipLevel) => { |
|
@@ -571,7 +571,7 @@ const _detailDataPkg = (origin, uid, vipLevel) => { |
571
|
result.tags = _getTagsDataByProductInfo(origin);
|
571
|
result.tags = _getTagsDataByProductInfo(origin);
|
572
|
|
572
|
|
573
|
// 商品促销短语
|
573
|
// 商品促销短语
|
574
|
- if (origin.salesPhase) {
|
574
|
+ if (origin.salesPhrase) {
|
575
|
result.saleTip = origin.salesPhrase;
|
575
|
result.saleTip = origin.salesPhrase;
|
576
|
}
|
576
|
}
|
577
|
|
577
|
|
|
@@ -596,7 +596,6 @@ const _detailDataPkg = (origin, uid, vipLevel) => { |
|
@@ -596,7 +596,6 @@ const _detailDataPkg = (origin, uid, vipLevel) => { |
596
|
// VIP学生数据
|
596
|
// VIP学生数据
|
597
|
result.vipPrice = _getVipDataByProductBaseInfo(origin, vipLevel, uid);
|
597
|
result.vipPrice = _getVipDataByProductBaseInfo(origin, vipLevel, uid);
|
598
|
}
|
598
|
}
|
599
|
-
|
|
|
600
|
// 促销活动banner,虚拟商品无促销
|
599
|
// 促销活动banner,虚拟商品无促销
|
601
|
if (origin.attribute !== 3) {
|
600
|
if (origin.attribute !== 3) {
|
602
|
result.activity = _getActivityDataByProductBaseInfo(origin);
|
601
|
result.activity = _getActivityDataByProductBaseInfo(origin);
|
|
@@ -662,9 +661,9 @@ const _detailDataPkg = (origin, uid, vipLevel) => { |
|
@@ -662,9 +661,9 @@ const _detailDataPkg = (origin, uid, vipLevel) => { |
662
|
|
661
|
|
663
|
let fashTopGoods = _getFashionTopGoodsStatus(uid, showStatus, isBeginSale);
|
662
|
let fashTopGoods = _getFashionTopGoodsStatus(uid, showStatus, isBeginSale);
|
664
|
|
663
|
|
665
|
- result.fashTopGoods = {
|
664
|
+ result.fashionTopGoods = {
|
666
|
getLimitedCode: fashTopGoods.getLimitedCode, // 限购码状态
|
665
|
getLimitedCode: fashTopGoods.getLimitedCode, // 限购码状态
|
667
|
- hasLimitedCode: fashTopGoods.hasLimitedCode, // 是否已经获取限购码
|
666
|
+ hadLimitedCode: fashTopGoods.hadLimitedCode, // 是否已经获取限购码
|
668
|
limitedCodeSoldOut: fashTopGoods.limitedCodeSoldOut, // 限购码是否已经抢光
|
667
|
limitedCodeSoldOut: fashTopGoods.limitedCodeSoldOut, // 限购码是否已经抢光
|
669
|
getLimitedCodeDis: fashTopGoods.getLimitedCodeDis // 限购码是否失效
|
668
|
getLimitedCodeDis: fashTopGoods.getLimitedCodeDis // 限购码是否失效
|
670
|
};
|
669
|
};
|
|
@@ -757,7 +756,9 @@ const _detailDataPkg = (origin, uid, vipLevel) => { |
|
@@ -757,7 +756,9 @@ const _detailDataPkg = (origin, uid, vipLevel) => { |
757
|
banner.bgImg = basisData.shopTopBanner.banner || banner.bgImg;
|
756
|
banner.bgImg = basisData.shopTopBanner.banner || banner.bgImg;
|
758
|
break;
|
757
|
break;
|
759
|
default:
|
758
|
default:
|
760
|
- break;
|
759
|
+ {
|
|
|
760
|
+ break;
|
|
|
761
|
+ }
|
761
|
}
|
762
|
}
|
762
|
}
|
763
|
}
|
763
|
}
|
764
|
}
|
|
@@ -765,7 +766,7 @@ const _detailDataPkg = (origin, uid, vipLevel) => { |
|
@@ -765,7 +766,7 @@ const _detailDataPkg = (origin, uid, vipLevel) => { |
765
|
statGoodsInfo.imageUrl = result.img;
|
766
|
statGoodsInfo.imageUrl = result.img;
|
766
|
statGoodsInfo.productUrl = result.weixinUrl;
|
767
|
statGoodsInfo.productUrl = result.weixinUrl;
|
767
|
statGoodsInfo.smallSortId = result.smallSortId;
|
768
|
statGoodsInfo.smallSortId = result.smallSortId;
|
768
|
- statGoodsInfo.soldOut = parseInt(soldOut, 10);
|
769
|
+ statGoodsInfo.soldOut = parseInt(soldOut);
|
769
|
|
770
|
|
770
|
return {
|
771
|
return {
|
771
|
goodsInfo: result,
|
772
|
goodsInfo: result,
|
|
@@ -1130,8 +1131,8 @@ const _getDetailDataBySizeInfo = (sizeInfo) => { |
|
@@ -1130,8 +1131,8 @@ const _getDetailDataBySizeInfo = (sizeInfo) => { |
1130
|
let details = '';
|
1131
|
let details = '';
|
1131
|
|
1132
|
|
1132
|
// 详情配图
|
1133
|
// 详情配图
|
1133
|
- if (sizeInfo.productIntroBo.productIntro) {
|
|
|
1134
|
- if (sizeInfo.productDescBo.phrase) {
|
1134
|
+ if (_.get(sizeInfo, 'productIntroBo.productIntro', null)) {
|
|
|
1135
|
+ if (_.get(sizeInfo, 'productIntroBo.phrase', null)) {
|
1135
|
details += `${sizeInfo.productDescBo.phrase}<br/>`;
|
1136
|
details += `${sizeInfo.productDescBo.phrase}<br/>`;
|
1136
|
}
|
1137
|
}
|
1137
|
}
|
1138
|
}
|
|
@@ -1144,7 +1145,7 @@ const _getDetailDataBySizeInfo = (sizeInfo) => { |
|
@@ -1144,7 +1145,7 @@ const _getDetailDataBySizeInfo = (sizeInfo) => { |
1144
|
'///93d3f///yH5BAEAAAMALAAAAAABAAEAAAICVAEAOw==" data-original='
|
1145
|
'///93d3f///yH5BAEAAAMALAAAAAABAAEAAAICVAEAOw==" data-original='
|
1145
|
};
|
1146
|
};
|
1146
|
|
1147
|
|
1147
|
- let intro = sizeInfo.productIntroBo.productIntro;
|
1148
|
+ let intro = _.get(sizeInfo, 'productIntroBo.productIntro', '');
|
1148
|
|
1149
|
|
1149
|
_(replacePairs).forEach((value, key)=> {
|
1150
|
_(replacePairs).forEach((value, key)=> {
|
1150
|
intro = _.replace(intro, key, value);
|
1151
|
intro = _.replace(intro, key, value);
|