@fonixtree/magic-design 1.0.8 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/assets/fonts/.DS_Store +0 -0
- package/es/assets/less/modal.less +1 -1
- package/es/common/LinkModal/FilteredProductModal/index.js +6 -2
- package/es/common/LinkModal/FilteredProductModal/index.less +1 -1
- package/es/common/LinkModal/index.js +1 -1
- package/es/common/ProductModal/index.js +18 -23
- package/es/composite-comp/bol/components/Banner/mobile/index.js +6 -0
- package/es/composite-comp/common/components/ProductItem/index.js +3 -1
- package/es/composite-comp/common/components/ProductItem/index.less +9 -0
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +14 -2
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +1 -1
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +14 -2
- package/es/utils/commonUtil.js +16 -2
- package/lib/assets/fonts/.DS_Store +0 -0
- package/lib/assets/less/modal.less +1 -1
- package/lib/common/LinkModal/FilteredProductModal/index.js +6 -2
- package/lib/common/LinkModal/FilteredProductModal/index.less +1 -1
- package/lib/common/LinkModal/index.js +1 -1
- package/lib/common/ProductModal/index.js +18 -23
- package/lib/composite-comp/bol/components/Banner/mobile/index.js +6 -0
- package/lib/composite-comp/common/components/ProductItem/index.js +3 -1
- package/lib/composite-comp/common/components/ProductItem/index.less +9 -0
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +14 -2
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +1 -1
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +14 -2
- package/lib/utils/commonUtil.js +16 -2
- package/package.json +1 -1
|
Binary file
|
|
@@ -532,12 +532,14 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
532
532
|
layout: "vertical"
|
|
533
533
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
534
534
|
label: "Category"
|
|
535
|
-
}, /*#__PURE__*/_react["default"].createElement(_antd.TreeSelect
|
|
536
|
-
|
|
535
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.TreeSelect // allowClear
|
|
536
|
+
, {
|
|
537
537
|
dropdownStyle: {
|
|
538
538
|
maxHeight: 400,
|
|
539
539
|
overflow: 'auto'
|
|
540
540
|
},
|
|
541
|
+
maxTagCount: 2,
|
|
542
|
+
maxTagTextLength: 5,
|
|
541
543
|
multiple: true,
|
|
542
544
|
onChange: onChange,
|
|
543
545
|
placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
|
|
@@ -549,6 +551,8 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
549
551
|
label: "Brand"
|
|
550
552
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
551
553
|
defaultValue: [],
|
|
554
|
+
maxTagCount: 2,
|
|
555
|
+
maxTagTextLength: 5,
|
|
552
556
|
mode: "multiple",
|
|
553
557
|
onChange: handleBrandChange,
|
|
554
558
|
placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
|
|
@@ -285,7 +285,7 @@ var LinkModal = function LinkModal(props) {
|
|
|
285
285
|
,
|
|
286
286
|
title: (0, _locale.i18n)('URL_SETUP'),
|
|
287
287
|
visible: visible,
|
|
288
|
-
width: "
|
|
288
|
+
width: "1000px",
|
|
289
289
|
wrapClassName: "magicLinkModal"
|
|
290
290
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Tabs, {
|
|
291
291
|
activeKey: selected,
|
|
@@ -377,21 +377,18 @@ var ProductModal = function ProductModal(props) {
|
|
|
377
377
|
|
|
378
378
|
var queryOfferCatgs = function queryOfferCatgs() {
|
|
379
379
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
380
|
-
var res,
|
|
380
|
+
var res, tree;
|
|
381
381
|
return __generator(this, function (_a) {
|
|
382
382
|
switch (_a.label) {
|
|
383
383
|
case 0:
|
|
384
384
|
return [4
|
|
385
385
|
/*yield*/
|
|
386
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/
|
|
386
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/offercatgs/list", {}, 'GET')];
|
|
387
387
|
|
|
388
388
|
case 1:
|
|
389
389
|
res = _a.sent();
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
if (f.children) arr.push.apply(arr, f.children);
|
|
393
|
-
});
|
|
394
|
-
setCatgsList(arr);
|
|
390
|
+
tree = (0, _businessUtil.listToTree)(res);
|
|
391
|
+
setCatgsList(tree);
|
|
395
392
|
return [2
|
|
396
393
|
/*return*/
|
|
397
394
|
];
|
|
@@ -565,35 +562,33 @@ var ProductModal = function ProductModal(props) {
|
|
|
565
562
|
layout: "vertical"
|
|
566
563
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
567
564
|
label: "Category"
|
|
568
|
-
}, /*#__PURE__*/_react["default"].createElement(_antd.
|
|
569
|
-
|
|
570
|
-
|
|
565
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.TreeSelect, {
|
|
566
|
+
dropdownStyle: {
|
|
567
|
+
maxHeight: 400,
|
|
568
|
+
overflow: 'auto'
|
|
569
|
+
},
|
|
570
|
+
maxTagCount: 2,
|
|
571
|
+
maxTagTextLength: 5,
|
|
572
|
+
multiple: true,
|
|
573
|
+
onChange: function onChange(value) {
|
|
571
574
|
setSelCatgsList(value);
|
|
572
575
|
},
|
|
573
576
|
placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
|
|
574
577
|
size: "small",
|
|
578
|
+
treeData: catgsList,
|
|
579
|
+
treeDefaultExpandAll: true,
|
|
575
580
|
value: selCatgsList
|
|
576
|
-
},
|
|
577
|
-
return /*#__PURE__*/_react["default"].createElement(OptGroup, {
|
|
578
|
-
key: item.model.catgId,
|
|
579
|
-
label: item.model.catgName
|
|
580
|
-
}, (item.children || []).map(function (i) {
|
|
581
|
-
return /*#__PURE__*/_react["default"].createElement(Option, {
|
|
582
|
-
key: i.model.catgId,
|
|
583
|
-
value: i.model.catgId
|
|
584
|
-
}, i.model.catgName);
|
|
585
|
-
}));
|
|
586
|
-
}))), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
581
|
+
})), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
587
582
|
label: "Brand"
|
|
588
583
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
589
584
|
mode: "multiple",
|
|
590
|
-
onChange: function onChange(value
|
|
585
|
+
onChange: function onChange(value) {
|
|
591
586
|
setSelBrandsList(value);
|
|
592
587
|
},
|
|
593
588
|
placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
|
|
594
589
|
size: "small",
|
|
595
590
|
value: selBrandsList
|
|
596
|
-
}, brandsList.map(function (item
|
|
591
|
+
}, brandsList.map(function (item) {
|
|
597
592
|
return /*#__PURE__*/_react["default"].createElement(Option, {
|
|
598
593
|
key: item.catgId,
|
|
599
594
|
value: item.brandId
|
|
@@ -208,6 +208,12 @@ function (_super) {
|
|
|
208
208
|
style: _this.getBackgroundStyle(item)
|
|
209
209
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
210
210
|
className: "carouselItem",
|
|
211
|
+
onClick: function onClick() {
|
|
212
|
+
/** PTO 定制GA */
|
|
213
|
+
if (window.magicDesign.pushGA) {
|
|
214
|
+
window.magicDesign.pushGA({}, 'select_promotion');
|
|
215
|
+
}
|
|
216
|
+
},
|
|
211
217
|
onMouseEnter: _this.mouseEnterWrap,
|
|
212
218
|
onMouseLeave: _this.mouseLeaveWrap,
|
|
213
219
|
style: _this.getItemStyle(item)
|
|
@@ -226,7 +226,9 @@ function (_super) {
|
|
|
226
226
|
style: {
|
|
227
227
|
width: salePercent + "%"
|
|
228
228
|
}
|
|
229
|
-
})))
|
|
229
|
+
}))), !showProgress && data.salesCnt > 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
230
|
+
className: "sold-count"
|
|
231
|
+
}, (0, _commonUtil.convertCount)(data.salesCnt), " sold")));
|
|
230
232
|
};
|
|
231
233
|
|
|
232
234
|
ProductItem.defaultProps = {
|
|
@@ -635,7 +635,14 @@ function (_super) {
|
|
|
635
635
|
layout: layout === 'layout2' ? 'horizontal' : 'vertical' // onItemClick={() => clickUrl(`/product/detail/${item.offerId}?productId=${item.sppProductId || item.productId || ''}`)}
|
|
636
636
|
,
|
|
637
637
|
onItemClick: function onItemClick() {
|
|
638
|
-
|
|
638
|
+
/** PTO 定制GA */
|
|
639
|
+
if (window.magicDesign.pushGA) {
|
|
640
|
+
window.magicDesign.pushGA(item, 'select_item', {
|
|
641
|
+
event_action: 'Select Item'
|
|
642
|
+
});
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
(0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || item.productId || ''));
|
|
639
646
|
},
|
|
640
647
|
panelProps: panelProps.content,
|
|
641
648
|
showProgress: false
|
|
@@ -661,7 +668,12 @@ function (_super) {
|
|
|
661
668
|
imgWidth: imgWidth // onItemClick={() => clickUrl(`/product/detail/${item.offerId}?productId=${item.sppProductId || item.productId || ''}`)}
|
|
662
669
|
,
|
|
663
670
|
onItemClick: function onItemClick() {
|
|
664
|
-
|
|
671
|
+
/** PTO 定制GA */
|
|
672
|
+
if (window.magicDesign.pushGA) {
|
|
673
|
+
window.magicDesign.pushGA({}, 'select_item', item);
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
(0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || item.productId || ''));
|
|
665
677
|
},
|
|
666
678
|
panelProps: panelProps.content,
|
|
667
679
|
showProgress: false
|
package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js
CHANGED
|
@@ -255,7 +255,7 @@ function (_super) {
|
|
|
255
255
|
];
|
|
256
256
|
return [4
|
|
257
257
|
/*yield*/
|
|
258
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offercatgs/list")];
|
|
258
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/offercatgs/list")];
|
|
259
259
|
|
|
260
260
|
case 1:
|
|
261
261
|
res = _a.sent();
|
|
@@ -81,6 +81,18 @@ function (_super) {
|
|
|
81
81
|
|
|
82
82
|
_this.state = {};
|
|
83
83
|
|
|
84
|
+
_this.hasSource = function (type) {
|
|
85
|
+
if (!window.systemParams || !window.systemParams.recommendSource) {
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (window.systemParams.recommendSource && window.systemParams.recommendSource.includes(type)) {
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return false;
|
|
94
|
+
};
|
|
95
|
+
|
|
84
96
|
_this.getContentPanel = function () {
|
|
85
97
|
var panelProps = _this.props.panelProps;
|
|
86
98
|
|
|
@@ -95,9 +107,9 @@ function (_super) {
|
|
|
95
107
|
_this.selfRender();
|
|
96
108
|
},
|
|
97
109
|
value: panelProps.sourceType
|
|
98
|
-
}, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
110
|
+
}, _this.hasSource('P') && /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
99
111
|
value: "select"
|
|
100
|
-
}, (0, _locale.i18n)('SELECT_PRODUCT')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
112
|
+
}, (0, _locale.i18n)('SELECT_PRODUCT')), _this.hasSource('A') && /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
101
113
|
value: "recommend"
|
|
102
114
|
}, (0, _locale.i18n)('AI_RECOMMENDATION')))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
103
115
|
className: "greyBg"
|
package/es/utils/commonUtil.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.addZero = exports.addUrlQuery = void 0;
|
|
|
7
7
|
exports.asyncDataURLtoImage = asyncDataURLtoImage;
|
|
8
8
|
exports.checkFileName = exports.calcLastTime = exports.asyncNextTick = void 0;
|
|
9
9
|
exports.commonFetch = commonFetch;
|
|
10
|
-
exports.compatibleNewPageData = void 0;
|
|
10
|
+
exports.convertCount = exports.compatibleNewPageData = void 0;
|
|
11
11
|
exports.convertImageUrl = convertImageUrl;
|
|
12
12
|
exports.convertToRem = void 0;
|
|
13
13
|
exports.copy2ClipBoard = copy2ClipBoard;
|
|
@@ -884,4 +884,18 @@ var downloadBase64Image = function downloadBase64Image(base64String, filename) {
|
|
|
884
884
|
link.click();
|
|
885
885
|
};
|
|
886
886
|
|
|
887
|
-
exports.downloadBase64Image = downloadBase64Image;
|
|
887
|
+
exports.downloadBase64Image = downloadBase64Image;
|
|
888
|
+
|
|
889
|
+
var convertCount = function convertCount(value) {
|
|
890
|
+
var newValue = value;
|
|
891
|
+
|
|
892
|
+
if (value >= 1000000) {
|
|
893
|
+
newValue = Number(value / 1000000).toFixed(1) + "M";
|
|
894
|
+
} else if (value >= 1000) {
|
|
895
|
+
newValue = Number(value / 1000).toFixed(1) + "K";
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
return newValue;
|
|
899
|
+
};
|
|
900
|
+
|
|
901
|
+
exports.convertCount = convertCount;
|
|
Binary file
|
|
@@ -532,12 +532,14 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
532
532
|
layout: "vertical"
|
|
533
533
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
534
534
|
label: "Category"
|
|
535
|
-
}, /*#__PURE__*/_react["default"].createElement(_antd.TreeSelect
|
|
536
|
-
|
|
535
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.TreeSelect // allowClear
|
|
536
|
+
, {
|
|
537
537
|
dropdownStyle: {
|
|
538
538
|
maxHeight: 400,
|
|
539
539
|
overflow: 'auto'
|
|
540
540
|
},
|
|
541
|
+
maxTagCount: 2,
|
|
542
|
+
maxTagTextLength: 5,
|
|
541
543
|
multiple: true,
|
|
542
544
|
onChange: onChange,
|
|
543
545
|
placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
|
|
@@ -549,6 +551,8 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
549
551
|
label: "Brand"
|
|
550
552
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
551
553
|
defaultValue: [],
|
|
554
|
+
maxTagCount: 2,
|
|
555
|
+
maxTagTextLength: 5,
|
|
552
556
|
mode: "multiple",
|
|
553
557
|
onChange: handleBrandChange,
|
|
554
558
|
placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
|
|
@@ -285,7 +285,7 @@ var LinkModal = function LinkModal(props) {
|
|
|
285
285
|
,
|
|
286
286
|
title: (0, _locale.i18n)('URL_SETUP'),
|
|
287
287
|
visible: visible,
|
|
288
|
-
width: "
|
|
288
|
+
width: "1000px",
|
|
289
289
|
wrapClassName: "magicLinkModal"
|
|
290
290
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Tabs, {
|
|
291
291
|
activeKey: selected,
|
|
@@ -377,21 +377,18 @@ var ProductModal = function ProductModal(props) {
|
|
|
377
377
|
|
|
378
378
|
var queryOfferCatgs = function queryOfferCatgs() {
|
|
379
379
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
380
|
-
var res,
|
|
380
|
+
var res, tree;
|
|
381
381
|
return __generator(this, function (_a) {
|
|
382
382
|
switch (_a.label) {
|
|
383
383
|
case 0:
|
|
384
384
|
return [4
|
|
385
385
|
/*yield*/
|
|
386
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/
|
|
386
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/offercatgs/list", {}, 'GET')];
|
|
387
387
|
|
|
388
388
|
case 1:
|
|
389
389
|
res = _a.sent();
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
if (f.children) arr.push.apply(arr, f.children);
|
|
393
|
-
});
|
|
394
|
-
setCatgsList(arr);
|
|
390
|
+
tree = (0, _businessUtil.listToTree)(res);
|
|
391
|
+
setCatgsList(tree);
|
|
395
392
|
return [2
|
|
396
393
|
/*return*/
|
|
397
394
|
];
|
|
@@ -565,35 +562,33 @@ var ProductModal = function ProductModal(props) {
|
|
|
565
562
|
layout: "vertical"
|
|
566
563
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
567
564
|
label: "Category"
|
|
568
|
-
}, /*#__PURE__*/_react["default"].createElement(_antd.
|
|
569
|
-
|
|
570
|
-
|
|
565
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.TreeSelect, {
|
|
566
|
+
dropdownStyle: {
|
|
567
|
+
maxHeight: 400,
|
|
568
|
+
overflow: 'auto'
|
|
569
|
+
},
|
|
570
|
+
maxTagCount: 2,
|
|
571
|
+
maxTagTextLength: 5,
|
|
572
|
+
multiple: true,
|
|
573
|
+
onChange: function onChange(value) {
|
|
571
574
|
setSelCatgsList(value);
|
|
572
575
|
},
|
|
573
576
|
placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
|
|
574
577
|
size: "small",
|
|
578
|
+
treeData: catgsList,
|
|
579
|
+
treeDefaultExpandAll: true,
|
|
575
580
|
value: selCatgsList
|
|
576
|
-
},
|
|
577
|
-
return /*#__PURE__*/_react["default"].createElement(OptGroup, {
|
|
578
|
-
key: item.model.catgId,
|
|
579
|
-
label: item.model.catgName
|
|
580
|
-
}, (item.children || []).map(function (i) {
|
|
581
|
-
return /*#__PURE__*/_react["default"].createElement(Option, {
|
|
582
|
-
key: i.model.catgId,
|
|
583
|
-
value: i.model.catgId
|
|
584
|
-
}, i.model.catgName);
|
|
585
|
-
}));
|
|
586
|
-
}))), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
581
|
+
})), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
587
582
|
label: "Brand"
|
|
588
583
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
589
584
|
mode: "multiple",
|
|
590
|
-
onChange: function onChange(value
|
|
585
|
+
onChange: function onChange(value) {
|
|
591
586
|
setSelBrandsList(value);
|
|
592
587
|
},
|
|
593
588
|
placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
|
|
594
589
|
size: "small",
|
|
595
590
|
value: selBrandsList
|
|
596
|
-
}, brandsList.map(function (item
|
|
591
|
+
}, brandsList.map(function (item) {
|
|
597
592
|
return /*#__PURE__*/_react["default"].createElement(Option, {
|
|
598
593
|
key: item.catgId,
|
|
599
594
|
value: item.brandId
|
|
@@ -208,6 +208,12 @@ function (_super) {
|
|
|
208
208
|
style: _this.getBackgroundStyle(item)
|
|
209
209
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
210
210
|
className: "carouselItem",
|
|
211
|
+
onClick: function onClick() {
|
|
212
|
+
/** PTO 定制GA */
|
|
213
|
+
if (window.magicDesign.pushGA) {
|
|
214
|
+
window.magicDesign.pushGA({}, 'select_promotion');
|
|
215
|
+
}
|
|
216
|
+
},
|
|
211
217
|
onMouseEnter: _this.mouseEnterWrap,
|
|
212
218
|
onMouseLeave: _this.mouseLeaveWrap,
|
|
213
219
|
style: _this.getItemStyle(item)
|
|
@@ -226,7 +226,9 @@ function (_super) {
|
|
|
226
226
|
style: {
|
|
227
227
|
width: salePercent + "%"
|
|
228
228
|
}
|
|
229
|
-
})))
|
|
229
|
+
}))), !showProgress && data.salesCnt > 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
230
|
+
className: "sold-count"
|
|
231
|
+
}, (0, _commonUtil.convertCount)(data.salesCnt), " sold")));
|
|
230
232
|
};
|
|
231
233
|
|
|
232
234
|
ProductItem.defaultProps = {
|
|
@@ -635,7 +635,14 @@ function (_super) {
|
|
|
635
635
|
layout: layout === 'layout2' ? 'horizontal' : 'vertical' // onItemClick={() => clickUrl(`/product/detail/${item.offerId}?productId=${item.sppProductId || item.productId || ''}`)}
|
|
636
636
|
,
|
|
637
637
|
onItemClick: function onItemClick() {
|
|
638
|
-
|
|
638
|
+
/** PTO 定制GA */
|
|
639
|
+
if (window.magicDesign.pushGA) {
|
|
640
|
+
window.magicDesign.pushGA(item, 'select_item', {
|
|
641
|
+
event_action: 'Select Item'
|
|
642
|
+
});
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
(0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || item.productId || ''));
|
|
639
646
|
},
|
|
640
647
|
panelProps: panelProps.content,
|
|
641
648
|
showProgress: false
|
|
@@ -661,7 +668,12 @@ function (_super) {
|
|
|
661
668
|
imgWidth: imgWidth // onItemClick={() => clickUrl(`/product/detail/${item.offerId}?productId=${item.sppProductId || item.productId || ''}`)}
|
|
662
669
|
,
|
|
663
670
|
onItemClick: function onItemClick() {
|
|
664
|
-
|
|
671
|
+
/** PTO 定制GA */
|
|
672
|
+
if (window.magicDesign.pushGA) {
|
|
673
|
+
window.magicDesign.pushGA({}, 'select_item', item);
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
(0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || item.productId || ''));
|
|
665
677
|
},
|
|
666
678
|
panelProps: panelProps.content,
|
|
667
679
|
showProgress: false
|
package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js
CHANGED
|
@@ -255,7 +255,7 @@ function (_super) {
|
|
|
255
255
|
];
|
|
256
256
|
return [4
|
|
257
257
|
/*yield*/
|
|
258
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offercatgs/list")];
|
|
258
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/offercatgs/list")];
|
|
259
259
|
|
|
260
260
|
case 1:
|
|
261
261
|
res = _a.sent();
|
|
@@ -81,6 +81,18 @@ function (_super) {
|
|
|
81
81
|
|
|
82
82
|
_this.state = {};
|
|
83
83
|
|
|
84
|
+
_this.hasSource = function (type) {
|
|
85
|
+
if (!window.systemParams || !window.systemParams.recommendSource) {
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (window.systemParams.recommendSource && window.systemParams.recommendSource.includes(type)) {
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return false;
|
|
94
|
+
};
|
|
95
|
+
|
|
84
96
|
_this.getContentPanel = function () {
|
|
85
97
|
var panelProps = _this.props.panelProps;
|
|
86
98
|
|
|
@@ -95,9 +107,9 @@ function (_super) {
|
|
|
95
107
|
_this.selfRender();
|
|
96
108
|
},
|
|
97
109
|
value: panelProps.sourceType
|
|
98
|
-
}, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
110
|
+
}, _this.hasSource('P') && /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
99
111
|
value: "select"
|
|
100
|
-
}, (0, _locale.i18n)('SELECT_PRODUCT')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
112
|
+
}, (0, _locale.i18n)('SELECT_PRODUCT')), _this.hasSource('A') && /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
101
113
|
value: "recommend"
|
|
102
114
|
}, (0, _locale.i18n)('AI_RECOMMENDATION')))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
103
115
|
className: "greyBg"
|
package/lib/utils/commonUtil.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.addZero = exports.addUrlQuery = void 0;
|
|
|
7
7
|
exports.asyncDataURLtoImage = asyncDataURLtoImage;
|
|
8
8
|
exports.checkFileName = exports.calcLastTime = exports.asyncNextTick = void 0;
|
|
9
9
|
exports.commonFetch = commonFetch;
|
|
10
|
-
exports.compatibleNewPageData = void 0;
|
|
10
|
+
exports.convertCount = exports.compatibleNewPageData = void 0;
|
|
11
11
|
exports.convertImageUrl = convertImageUrl;
|
|
12
12
|
exports.convertToRem = void 0;
|
|
13
13
|
exports.copy2ClipBoard = copy2ClipBoard;
|
|
@@ -884,4 +884,18 @@ var downloadBase64Image = function downloadBase64Image(base64String, filename) {
|
|
|
884
884
|
link.click();
|
|
885
885
|
};
|
|
886
886
|
|
|
887
|
-
exports.downloadBase64Image = downloadBase64Image;
|
|
887
|
+
exports.downloadBase64Image = downloadBase64Image;
|
|
888
|
+
|
|
889
|
+
var convertCount = function convertCount(value) {
|
|
890
|
+
var newValue = value;
|
|
891
|
+
|
|
892
|
+
if (value >= 1000000) {
|
|
893
|
+
newValue = Number(value / 1000000).toFixed(1) + "M";
|
|
894
|
+
} else if (value >= 1000) {
|
|
895
|
+
newValue = Number(value / 1000).toFixed(1) + "K";
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
return newValue;
|
|
899
|
+
};
|
|
900
|
+
|
|
901
|
+
exports.convertCount = convertCount;
|