@fonixtree/magic-design 2.0.72 → 2.0.73
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/common/AffiliateProductModal/index.js +1 -1
- package/es/common/AffiliateProductModal/index.less +1 -1
- package/es/common/LinkModal/FilteredProductModal/index.js +154 -104
- package/es/common/LinkModal/FilteredProductModal/index.less +7 -0
- package/es/common/LinkModal/ProductDetailPage/index.js +92 -57
- package/es/common/LinkModal/ProductDetailPage/index.less +6 -1
- package/es/common/ProductModal/index.js +124 -87
- package/es/common/ProductModal/index.less +7 -1
- package/es/common/ProductSource/index.js +82 -21
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +26 -23
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +4 -2
- package/es/locale/en/en.json +3 -2
- package/es/locale/es/es.json +3 -2
- package/es/locale/id/id.json +3 -2
- package/es/utils/commonUtil.js +14 -6
- package/lib/assets/fonts/.DS_Store +0 -0
- package/lib/common/AffiliateProductModal/index.js +1 -1
- package/lib/common/AffiliateProductModal/index.less +1 -1
- package/lib/common/LinkModal/FilteredProductModal/index.js +154 -104
- package/lib/common/LinkModal/FilteredProductModal/index.less +7 -0
- package/lib/common/LinkModal/ProductDetailPage/index.js +92 -57
- package/lib/common/LinkModal/ProductDetailPage/index.less +6 -1
- package/lib/common/ProductModal/index.js +124 -87
- package/lib/common/ProductModal/index.less +7 -1
- package/lib/common/ProductSource/index.js +82 -21
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +26 -23
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +4 -2
- package/lib/locale/en/en.json +3 -2
- package/lib/locale/es/es.json +3 -2
- package/lib/locale/id/id.json +3 -2
- package/lib/utils/commonUtil.js +14 -6
- package/package.json +1 -1
package/es/locale/en/en.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"PUSH": "Push",
|
|
3
|
-
"SET_AS_TEMPLATE":"Set as Template",
|
|
3
|
+
"SET_AS_TEMPLATE": "Set as Template",
|
|
4
4
|
"DISPLAY_PAGE": "Display page",
|
|
5
5
|
"NAME": "Name",
|
|
6
6
|
"ADD_MENU": "Add Menu",
|
|
@@ -97,7 +97,8 @@
|
|
|
97
97
|
"BANNER_HEIGHT": "Banner Height",
|
|
98
98
|
"IMAGE": "Image",
|
|
99
99
|
"PRODUCT_NAME": "Product Name",
|
|
100
|
-
"
|
|
100
|
+
"SKU_CODE": "SKU Code",
|
|
101
|
+
"SPU_CODE": "SPU Code",
|
|
101
102
|
"SKU": "SKU",
|
|
102
103
|
"PRICE": "Price",
|
|
103
104
|
"BRAND": "Brand",
|
package/es/locale/es/es.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"PUSH": "Push",
|
|
3
|
-
"SET_AS_TEMPLATE":"Set as Template",
|
|
3
|
+
"SET_AS_TEMPLATE": "Set as Template",
|
|
4
4
|
"DISPLAY_PAGE": "Display page",
|
|
5
5
|
"NAME": "Name",
|
|
6
6
|
"ADD_MENU": "Add Menu",
|
|
@@ -97,7 +97,8 @@
|
|
|
97
97
|
"BANNER_HEIGHT": "Altura del banner",
|
|
98
98
|
"IMAGE": "Imagen",
|
|
99
99
|
"PRODUCT_NAME": "Nombre del producto",
|
|
100
|
-
"
|
|
100
|
+
"SKU_CODE": "Código SKU",
|
|
101
|
+
"SPU_CODE": "Código spu",
|
|
101
102
|
"SKU": "SKU",
|
|
102
103
|
"PRICE": "Precio",
|
|
103
104
|
"BRAND": "Marca",
|
package/es/locale/id/id.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"PUSH": "Push",
|
|
3
|
-
"SET_AS_TEMPLATE":"Set as Template",
|
|
3
|
+
"SET_AS_TEMPLATE": "Set as Template",
|
|
4
4
|
"DISPLAY_PAGE": "Display page",
|
|
5
5
|
"NAME": "Name",
|
|
6
6
|
"ADD_MENU": "Add Menu",
|
|
@@ -97,7 +97,8 @@
|
|
|
97
97
|
"BANNER_HEIGHT": "Banner Height",
|
|
98
98
|
"IMAGE": "Image",
|
|
99
99
|
"PRODUCT_NAME": "Product Name",
|
|
100
|
-
"
|
|
100
|
+
"SKU_CODE": "SKU Code",
|
|
101
|
+
"SPU_CODE": "SPU Code",
|
|
101
102
|
"SKU": "SKU",
|
|
102
103
|
"PRICE": "Price",
|
|
103
104
|
"BRAND": "Brand",
|
package/es/utils/commonUtil.js
CHANGED
|
@@ -291,14 +291,22 @@ var navigateTo = function navigateTo(url) {
|
|
|
291
291
|
return;
|
|
292
292
|
}
|
|
293
293
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
294
|
+
var _a = url.split(';'),
|
|
295
|
+
h5Url = _a[0],
|
|
296
|
+
appUrl = _a[1]; // 未配置App路径并且h5绝对路径时直接跳转,其他情况让业务层处理
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
if (!appUrl && !h5Url.startsWith('/')) {
|
|
300
|
+
window.location.href = h5Url;
|
|
301
|
+
} else if (window.magicDesign.history) {
|
|
302
|
+
window.magicDesign.history.push(url);
|
|
303
|
+
} else if (window.magicDesign.navigatePreUrl) {
|
|
304
|
+
// 预览模式跳转
|
|
305
|
+
if (h5Url.startsWith('/')) {
|
|
298
306
|
window.location.href = "" + window.magicDesign.navigatePreUrl + url;
|
|
307
|
+
} else {
|
|
308
|
+
window.location.href = h5Url;
|
|
299
309
|
}
|
|
300
|
-
} else {
|
|
301
|
-
window.location.href = url;
|
|
302
310
|
}
|
|
303
311
|
};
|
|
304
312
|
|
|
Binary file
|
|
@@ -431,7 +431,7 @@ var AffiliateProductModal = function AffiliateProductModal(props) {
|
|
|
431
431
|
title: (0, _locale.i18n)('PRODUCT_SELECT'),
|
|
432
432
|
visible: visible,
|
|
433
433
|
width: "1200px",
|
|
434
|
-
wrapClassName: "
|
|
434
|
+
wrapClassName: "affiliateModalCot"
|
|
435
435
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
436
436
|
className: "proModalWrap"
|
|
437
437
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -184,6 +184,14 @@ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
|
|
184
184
|
}
|
|
185
185
|
};
|
|
186
186
|
|
|
187
|
+
var proTypeOption = [{
|
|
188
|
+
label: 'SKU',
|
|
189
|
+
value: 'sku'
|
|
190
|
+
}, {
|
|
191
|
+
label: 'SPU',
|
|
192
|
+
value: 'spu'
|
|
193
|
+
}];
|
|
194
|
+
|
|
187
195
|
var FilteredProductModal = function FilteredProductModal(props) {
|
|
188
196
|
var onDataChange = props.onDataChange;
|
|
189
197
|
var Option = _antd.Select.Option;
|
|
@@ -213,41 +221,41 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
213
221
|
labelData = _f[0],
|
|
214
222
|
setLabelData = _f[1];
|
|
215
223
|
|
|
216
|
-
var _g = (0, _react.useState)(''),
|
|
217
|
-
|
|
218
|
-
|
|
224
|
+
var _g = (0, _react.useState)(window.magicDesign.storeId || ''),
|
|
225
|
+
storeId = _g[0],
|
|
226
|
+
setStoreId = _g[1];
|
|
219
227
|
|
|
220
|
-
var _h = (0, _react.useState)(
|
|
221
|
-
|
|
222
|
-
|
|
228
|
+
var _h = (0, _react.useState)([]),
|
|
229
|
+
storeList = _h[0],
|
|
230
|
+
setStoreList = _h[1];
|
|
223
231
|
|
|
224
|
-
var _j = (0, _react.useState)(
|
|
225
|
-
|
|
226
|
-
|
|
232
|
+
var _j = (0, _react.useState)(''),
|
|
233
|
+
productName = _j[0],
|
|
234
|
+
setProductName = _j[1];
|
|
227
235
|
|
|
228
236
|
var _k = (0, _react.useState)(''),
|
|
229
|
-
|
|
230
|
-
|
|
237
|
+
minimum = _k[0],
|
|
238
|
+
setMinimum = _k[1];
|
|
231
239
|
|
|
232
240
|
var _l = (0, _react.useState)(''),
|
|
233
|
-
|
|
234
|
-
|
|
241
|
+
maximum = _l[0],
|
|
242
|
+
setMaximum = _l[1];
|
|
235
243
|
|
|
236
|
-
var _m = (0, _react.useState)(
|
|
237
|
-
|
|
238
|
-
|
|
244
|
+
var _m = (0, _react.useState)([]),
|
|
245
|
+
dataSource = _m[0],
|
|
246
|
+
setDataSource = _m[1];
|
|
239
247
|
|
|
240
|
-
var _o = (0, _react.useState)(
|
|
241
|
-
|
|
242
|
-
|
|
248
|
+
var _o = (0, _react.useState)({}),
|
|
249
|
+
promotions = _o[0],
|
|
250
|
+
setPromotions = _o[1];
|
|
243
251
|
|
|
244
|
-
var _p = (0, _react.useState)(
|
|
245
|
-
|
|
246
|
-
|
|
252
|
+
var _p = (0, _react.useState)(false),
|
|
253
|
+
loading = _p[0],
|
|
254
|
+
setLoading = _p[1];
|
|
247
255
|
|
|
248
|
-
var _q = (0, _react.useState)(
|
|
249
|
-
|
|
250
|
-
|
|
256
|
+
var _q = (0, _react.useState)('sku'),
|
|
257
|
+
proType = _q[0],
|
|
258
|
+
setProType = _q[1];
|
|
251
259
|
|
|
252
260
|
var _r = (0, _react.useState)({
|
|
253
261
|
pageSize: 20,
|
|
@@ -282,7 +290,6 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
282
290
|
settBrandId([]);
|
|
283
291
|
settLabelId({});
|
|
284
292
|
setStoreId(window.magicDesign.storeId || '');
|
|
285
|
-
setStoreName('');
|
|
286
293
|
setProductName('');
|
|
287
294
|
setMinimum('');
|
|
288
295
|
setMaximum('');
|
|
@@ -293,14 +300,14 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
293
300
|
|
|
294
301
|
var columns = [{
|
|
295
302
|
title: 'Image',
|
|
296
|
-
dataIndex: '
|
|
303
|
+
dataIndex: 'productImageUrl',
|
|
297
304
|
key: 'imgUrl',
|
|
298
305
|
width: 100,
|
|
299
306
|
render: function render(imgUrl, record) {
|
|
300
307
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
301
308
|
className: "prodImage",
|
|
302
309
|
style: {
|
|
303
|
-
backgroundImage: "url(\"" + (0, _commonUtil.convertImageUrl)(record.productImg || record.imgUrlContent || record.productImgContent) + "\")"
|
|
310
|
+
backgroundImage: "url(\"" + (imgUrl || (0, _commonUtil.convertImageUrl)(record.productImg || record.imgUrlContent || record.productImgContent)) + "\")"
|
|
304
311
|
}
|
|
305
312
|
});
|
|
306
313
|
}
|
|
@@ -309,13 +316,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
309
316
|
dataIndex: 'offerName',
|
|
310
317
|
key: 'offerName',
|
|
311
318
|
ellipsis: true
|
|
312
|
-
},
|
|
313
|
-
// title: 'SKU',
|
|
314
|
-
// dataIndex: 'attrValues',
|
|
315
|
-
// key: 'attrValues',
|
|
316
|
-
// ellipsis: true,
|
|
317
|
-
// },
|
|
318
|
-
{
|
|
319
|
+
}, {
|
|
319
320
|
title: 'Price',
|
|
320
321
|
dataIndex: 'salesPrice',
|
|
321
322
|
key: 'salesPrice',
|
|
@@ -439,72 +440,106 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
439
440
|
};
|
|
440
441
|
|
|
441
442
|
var loadGoods = function loadGoods() {
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
443
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
444
|
+
var _list, total, params, res, params, res_1, h5UrlStr;
|
|
445
|
+
|
|
446
|
+
return __generator(this, function (_a) {
|
|
447
|
+
switch (_a.label) {
|
|
448
|
+
case 0:
|
|
449
|
+
setLoading(true);
|
|
450
|
+
_list = [];
|
|
451
|
+
total = 0;
|
|
452
|
+
if (!(proType === 'sku')) return [3
|
|
453
|
+
/*break*/
|
|
454
|
+
, 2];
|
|
455
|
+
params = {
|
|
456
|
+
catgIds: tValue.join(','),
|
|
457
|
+
brandIds: brandId.map(function (v) {
|
|
458
|
+
return v.key;
|
|
459
|
+
}).join(','),
|
|
460
|
+
labelIds: labelId.key,
|
|
461
|
+
q: productName,
|
|
462
|
+
storeId: storeId,
|
|
463
|
+
startPrice: (0, _currencyUtil.formatBackendCurrency)(minimum),
|
|
464
|
+
endPrice: (0, _currencyUtil.formatBackendCurrency)(maximum),
|
|
465
|
+
campaignType: promotions.key || '',
|
|
466
|
+
state: 'A',
|
|
467
|
+
pageSize: paginationParams.pageSize,
|
|
468
|
+
pageIndex: paginationParams.current
|
|
469
|
+
};
|
|
470
|
+
return [4
|
|
471
|
+
/*yield*/
|
|
472
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offers/es", params, 'POST')];
|
|
473
|
+
|
|
474
|
+
case 1:
|
|
475
|
+
res = _a.sent();
|
|
476
|
+
_list = res.list || [];
|
|
477
|
+
total = res.total;
|
|
478
|
+
return [3
|
|
479
|
+
/*break*/
|
|
480
|
+
, 4];
|
|
481
|
+
|
|
482
|
+
case 2:
|
|
483
|
+
params = {
|
|
484
|
+
catgIds: tValue.join(','),
|
|
485
|
+
brandIds: brandId.map(function (v) {
|
|
486
|
+
return v.key;
|
|
487
|
+
}).join(','),
|
|
488
|
+
labelIds: labelId.key,
|
|
489
|
+
productName: productName,
|
|
490
|
+
storeId: storeId,
|
|
491
|
+
minPrice: (0, _currencyUtil.formatBackendCurrency)(minimum),
|
|
492
|
+
maxPrice: (0, _currencyUtil.formatBackendCurrency)(maximum),
|
|
493
|
+
cmpTypeId: promotions.key || '',
|
|
494
|
+
state: 'A',
|
|
495
|
+
pageSize: paginationParams.pageSize,
|
|
496
|
+
pageIndex: paginationParams.current
|
|
497
|
+
};
|
|
498
|
+
return [4
|
|
499
|
+
/*yield*/
|
|
500
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offers", __assign(__assign({}, params), {
|
|
501
|
+
isDefaultCover: 'Y',
|
|
502
|
+
onlyQryPublishSku: true,
|
|
503
|
+
auditState: 'S',
|
|
504
|
+
crmFlag: 'on'
|
|
505
|
+
}), 'GET')];
|
|
506
|
+
|
|
507
|
+
case 3:
|
|
508
|
+
res_1 = _a.sent();
|
|
509
|
+
_list = (0, _commonUtil.ensure)(function () {
|
|
510
|
+
return res_1.list.map(function (m) {
|
|
511
|
+
return __assign(__assign({}, m.products[0]), m);
|
|
512
|
+
});
|
|
513
|
+
}, []);
|
|
514
|
+
total = res_1.total;
|
|
515
|
+
_a.label = 4;
|
|
516
|
+
|
|
517
|
+
case 4:
|
|
518
|
+
paginationParams.total = total;
|
|
519
|
+
setLoading(false);
|
|
520
|
+
setPaginationParams(__assign({}, paginationParams));
|
|
521
|
+
h5UrlStr = JsonToUrl({
|
|
522
|
+
catgIds: tValue.join(',') || '',
|
|
523
|
+
brandIds: brandId.map(function (v) {
|
|
524
|
+
return v.key;
|
|
525
|
+
}).join(',') || '',
|
|
526
|
+
labelIds: labelId.key || '',
|
|
527
|
+
q: productName || '',
|
|
528
|
+
storeId: storeId || '',
|
|
529
|
+
minPrice: (0, _currencyUtil.formatBackendCurrency)(minimum),
|
|
530
|
+
maxPrice: (0, _currencyUtil.formatBackendCurrency)(maximum),
|
|
531
|
+
campaignType: promotions.key || '',
|
|
532
|
+
state: 'A',
|
|
533
|
+
proType: proType
|
|
534
|
+
});
|
|
535
|
+
setDataSource(_list);
|
|
536
|
+
return [2
|
|
537
|
+
/*return*/
|
|
538
|
+
, {
|
|
539
|
+
url: h5UrlStr,
|
|
540
|
+
total: total
|
|
541
|
+
}];
|
|
542
|
+
}
|
|
508
543
|
});
|
|
509
544
|
});
|
|
510
545
|
};
|
|
@@ -518,6 +553,10 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
518
553
|
queryStore();
|
|
519
554
|
}
|
|
520
555
|
}, []);
|
|
556
|
+
(0, _react.useEffect)(function () {
|
|
557
|
+
paginationParams.current = 1;
|
|
558
|
+
loadGoods();
|
|
559
|
+
}, [proType]);
|
|
521
560
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
522
561
|
className: "mFilteredProductModal"
|
|
523
562
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -664,13 +703,15 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
664
703
|
onClick: function onClick() {
|
|
665
704
|
paginationParams.current = 1;
|
|
666
705
|
loadGoods().then(function (res) {
|
|
706
|
+
console.log('res', res);
|
|
707
|
+
|
|
667
708
|
if (res.total !== 0) {
|
|
668
709
|
onDataChange({
|
|
669
710
|
value: res.url,
|
|
670
711
|
name: res.url
|
|
671
712
|
}, res.total);
|
|
672
713
|
} else {
|
|
673
|
-
onDataChange('', res.total);
|
|
714
|
+
onDataChange('', res.total);
|
|
674
715
|
}
|
|
675
716
|
});
|
|
676
717
|
},
|
|
@@ -686,7 +727,16 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
686
727
|
size: "small"
|
|
687
728
|
}, (0, _locale.i18n)('CANCEL'))))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
688
729
|
className: "rightCot"
|
|
689
|
-
}, /*#__PURE__*/_react["default"].createElement(_antd.
|
|
730
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Radio.Group, {
|
|
731
|
+
buttonStyle: "solid",
|
|
732
|
+
className: "btn-select-type",
|
|
733
|
+
onChange: function onChange(e) {
|
|
734
|
+
setProType(e.target.value);
|
|
735
|
+
},
|
|
736
|
+
options: proTypeOption,
|
|
737
|
+
optionType: "button",
|
|
738
|
+
value: proType
|
|
739
|
+
}), /*#__PURE__*/_react["default"].createElement(_antd.Table, {
|
|
690
740
|
columns: columns,
|
|
691
741
|
dataSource: dataSource,
|
|
692
742
|
loading: loading,
|
|
@@ -697,7 +747,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
697
747
|
}
|
|
698
748
|
}),
|
|
699
749
|
scroll: {
|
|
700
|
-
y:
|
|
750
|
+
y: 340
|
|
701
751
|
}
|
|
702
752
|
})))));
|
|
703
753
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
.mFilteredProductModal {
|
|
2
2
|
height: 550px;
|
|
3
|
+
|
|
3
4
|
.proModalWrap {
|
|
4
5
|
.info {
|
|
5
6
|
background: #ecf1fd;
|
|
@@ -24,6 +25,12 @@
|
|
|
24
25
|
width: calc(100% - 240px);
|
|
25
26
|
margin-left: 16px;
|
|
26
27
|
|
|
28
|
+
.btn-select-type {
|
|
29
|
+
display: block;
|
|
30
|
+
text-align: right;
|
|
31
|
+
margin-bottom: 10px;
|
|
32
|
+
}
|
|
33
|
+
|
|
27
34
|
.selectedCot {
|
|
28
35
|
width: 722px;
|
|
29
36
|
margin-left: 4px;
|