@fonixtree/magic-design 0.1.51 → 0.1.53
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/common/LinkModal/BundleCampaign/index.js +27 -22
- package/es/common/LinkModal/FilteredProductModal/index.js +5 -2
- package/es/common/LinkModal/ProductDetailPage/index.js +38 -33
- package/es/common/ProductModal/index.js +7 -2
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +1 -1
- package/es/utils/businessUtil.js +7 -1
- package/es/utils/commonUtil.js +8 -7
- package/lib/common/LinkModal/BundleCampaign/index.js +27 -22
- package/lib/common/LinkModal/FilteredProductModal/index.js +5 -2
- package/lib/common/LinkModal/ProductDetailPage/index.js +38 -33
- package/lib/common/ProductModal/index.js +7 -2
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +1 -1
- package/lib/utils/businessUtil.js +7 -1
- package/lib/utils/commonUtil.js +8 -7
- package/package.json +1 -1
|
@@ -13,6 +13,8 @@ var _antd = require("antd");
|
|
|
13
13
|
|
|
14
14
|
var _commonUtil = require("../../../utils/commonUtil");
|
|
15
15
|
|
|
16
|
+
var _businessUtil = require("../../../utils/businessUtil");
|
|
17
|
+
|
|
16
18
|
var _dateUtil = require("../../../utils/dateUtil");
|
|
17
19
|
|
|
18
20
|
require("./index.less");
|
|
@@ -298,7 +300,10 @@ var BundleCampaign = function BundleCampaign(props) {
|
|
|
298
300
|
};
|
|
299
301
|
|
|
300
302
|
(0, _react.useEffect)(function () {
|
|
301
|
-
|
|
303
|
+
if ((0, _businessUtil.isPlatform)()) {
|
|
304
|
+
queryStore();
|
|
305
|
+
}
|
|
306
|
+
|
|
302
307
|
var params = {
|
|
303
308
|
campaignName: campaignName,
|
|
304
309
|
storeId: storeId,
|
|
@@ -335,44 +340,44 @@ var BundleCampaign = function BundleCampaign(props) {
|
|
|
335
340
|
}
|
|
336
341
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
337
342
|
className: "labelStyle"
|
|
338
|
-
}, "
|
|
343
|
+
}, "Campaign State"), /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
339
344
|
className: "inputStyle",
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
},
|
|
343
|
-
optionFilterProp: "children",
|
|
344
|
-
placeholder: "Please select",
|
|
345
|
-
showSearch: true,
|
|
345
|
+
defaultValue: "A,B",
|
|
346
|
+
onChange: changeCamState,
|
|
346
347
|
size: "small",
|
|
347
|
-
value:
|
|
348
|
-
},
|
|
348
|
+
value: cmpState
|
|
349
|
+
}, stateMap && stateMap.length > 0 && stateMap.map(function (v) {
|
|
349
350
|
return /*#__PURE__*/_react["default"].createElement(Option, {
|
|
350
|
-
key: v.
|
|
351
|
-
value: v.
|
|
352
|
-
}, v.
|
|
351
|
+
key: v.key,
|
|
352
|
+
value: v.key
|
|
353
|
+
}, v.value);
|
|
353
354
|
})))), /*#__PURE__*/_react["default"].createElement(_antd.Row, {
|
|
354
355
|
className: "mb12",
|
|
355
356
|
style: {
|
|
356
357
|
width: '100%'
|
|
357
358
|
}
|
|
358
|
-
}, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
359
|
+
}, (0, _businessUtil.isPlatform)() && /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
359
360
|
span: 12,
|
|
360
361
|
style: {
|
|
361
362
|
display: 'flex'
|
|
362
363
|
}
|
|
363
364
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
364
365
|
className: "labelStyle"
|
|
365
|
-
}, "
|
|
366
|
+
}, "Store"), /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
366
367
|
className: "inputStyle",
|
|
367
|
-
|
|
368
|
-
|
|
368
|
+
onChange: function onChange(value) {
|
|
369
|
+
return setStoreId(value);
|
|
370
|
+
},
|
|
371
|
+
optionFilterProp: "children",
|
|
372
|
+
placeholder: "Please select",
|
|
373
|
+
showSearch: true,
|
|
369
374
|
size: "small",
|
|
370
|
-
value:
|
|
371
|
-
},
|
|
375
|
+
value: storeId
|
|
376
|
+
}, storeList && storeList.length > 0 && storeList.map(function (v) {
|
|
372
377
|
return /*#__PURE__*/_react["default"].createElement(Option, {
|
|
373
|
-
key: v.
|
|
374
|
-
value: v.
|
|
375
|
-
}, v.
|
|
378
|
+
key: v.storeId,
|
|
379
|
+
value: v.storeId
|
|
380
|
+
}, v.storeName);
|
|
376
381
|
}))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
377
382
|
span: 12,
|
|
378
383
|
style: {
|
|
@@ -514,7 +514,10 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
514
514
|
queryCategory();
|
|
515
515
|
queryBrand();
|
|
516
516
|
queryLabel();
|
|
517
|
-
|
|
517
|
+
|
|
518
|
+
if ((0, _businessUtil.isPlatform)()) {
|
|
519
|
+
queryStore();
|
|
520
|
+
}
|
|
518
521
|
}, []);
|
|
519
522
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
520
523
|
className: "mFilteredProductModal"
|
|
@@ -559,7 +562,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
559
562
|
key: v.brandId,
|
|
560
563
|
value: v.brandName
|
|
561
564
|
}, v.brandName);
|
|
562
|
-
}))), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
565
|
+
}))), (0, _businessUtil.isPlatform)() && /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
563
566
|
label: "Store"
|
|
564
567
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
565
568
|
className: "inputStyle",
|
|
@@ -15,6 +15,8 @@ var _locale = require("../../../locale");
|
|
|
15
15
|
|
|
16
16
|
var _commonUtil = require("../../../utils/commonUtil");
|
|
17
17
|
|
|
18
|
+
var _businessUtil = require("../../../utils/businessUtil");
|
|
19
|
+
|
|
18
20
|
require("./index.less");
|
|
19
21
|
|
|
20
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -307,7 +309,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
307
309
|
case 0:
|
|
308
310
|
return [4
|
|
309
311
|
/*yield*/
|
|
310
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/brands
|
|
312
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/stores/contract/brands")];
|
|
311
313
|
|
|
312
314
|
case 1:
|
|
313
315
|
res = _a.sent();
|
|
@@ -366,7 +368,10 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
366
368
|
|
|
367
369
|
queryGoods(params);
|
|
368
370
|
queryBrand();
|
|
369
|
-
|
|
371
|
+
|
|
372
|
+
if ((0, _businessUtil.isPlatform)()) {
|
|
373
|
+
queryStore();
|
|
374
|
+
}
|
|
370
375
|
}, []);
|
|
371
376
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
372
377
|
className: "productDetailPage"
|
|
@@ -398,35 +403,6 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
398
403
|
size: "small",
|
|
399
404
|
value: productCode
|
|
400
405
|
}))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
401
|
-
span: 6
|
|
402
|
-
}, /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
403
|
-
onClick: function onClick() {
|
|
404
|
-
setLoading(true);
|
|
405
|
-
paginationParams.pageIndex = 1;
|
|
406
|
-
|
|
407
|
-
var total = paginationParams.total,
|
|
408
|
-
params = __rest(paginationParams, ["total"]);
|
|
409
|
-
|
|
410
|
-
queryGoods(__assign({
|
|
411
|
-
productName: productName,
|
|
412
|
-
productCode: productCode,
|
|
413
|
-
brandIds: brandId.map(function (v) {
|
|
414
|
-
return v.key;
|
|
415
|
-
}).join(',') || '',
|
|
416
|
-
storeId: storeId
|
|
417
|
-
}, params));
|
|
418
|
-
},
|
|
419
|
-
size: "small",
|
|
420
|
-
style: {
|
|
421
|
-
marginRight: 10
|
|
422
|
-
},
|
|
423
|
-
type: "primary"
|
|
424
|
-
}, (0, _locale.i18n)('QUERY')), /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
425
|
-
onClick: function onClick() {
|
|
426
|
-
reset();
|
|
427
|
-
},
|
|
428
|
-
size: "small"
|
|
429
|
-
}, (0, _locale.i18n)('CANCEL'))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
430
406
|
span: 9
|
|
431
407
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
432
408
|
label: "Brand"
|
|
@@ -444,7 +420,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
444
420
|
key: v.brandId,
|
|
445
421
|
value: v.brandName
|
|
446
422
|
}, v.brandName);
|
|
447
|
-
})))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
423
|
+
})))), (0, _businessUtil.isPlatform)() && /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
448
424
|
span: 9
|
|
449
425
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
450
426
|
label: "Store"
|
|
@@ -463,7 +439,36 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
463
439
|
key: v.storeId,
|
|
464
440
|
value: v.storeId
|
|
465
441
|
}, v.storeName);
|
|
466
|
-
}))))
|
|
442
|
+
})))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
443
|
+
span: 6
|
|
444
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
445
|
+
onClick: function onClick() {
|
|
446
|
+
setLoading(true);
|
|
447
|
+
paginationParams.pageIndex = 1;
|
|
448
|
+
|
|
449
|
+
var total = paginationParams.total,
|
|
450
|
+
params = __rest(paginationParams, ["total"]);
|
|
451
|
+
|
|
452
|
+
queryGoods(__assign({
|
|
453
|
+
productName: productName,
|
|
454
|
+
productCode: productCode,
|
|
455
|
+
brandIds: brandId.map(function (v) {
|
|
456
|
+
return v.key;
|
|
457
|
+
}).join(',') || '',
|
|
458
|
+
storeId: storeId
|
|
459
|
+
}, params));
|
|
460
|
+
},
|
|
461
|
+
size: "small",
|
|
462
|
+
style: {
|
|
463
|
+
marginRight: 10
|
|
464
|
+
},
|
|
465
|
+
type: "primary"
|
|
466
|
+
}, (0, _locale.i18n)('QUERY')), /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
467
|
+
onClick: function onClick() {
|
|
468
|
+
reset();
|
|
469
|
+
},
|
|
470
|
+
size: "small"
|
|
471
|
+
}, (0, _locale.i18n)('CANCEL'))))), /*#__PURE__*/_react["default"].createElement(_antd.Table, {
|
|
467
472
|
bordered: false,
|
|
468
473
|
columns: columns,
|
|
469
474
|
dataSource: productList,
|
|
@@ -13,6 +13,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
|
|
14
14
|
var _commonUtil = require("../../utils/commonUtil");
|
|
15
15
|
|
|
16
|
+
var _businessUtil = require("../../utils/businessUtil");
|
|
17
|
+
|
|
16
18
|
var _Iconfont = _interopRequireDefault(require("../Iconfont"));
|
|
17
19
|
|
|
18
20
|
var _currencyUtil = require("../../utils/currencyUtil");
|
|
@@ -468,7 +470,10 @@ var ProductModal = function ProductModal(props) {
|
|
|
468
470
|
queryOfferCatgs();
|
|
469
471
|
queryBrands();
|
|
470
472
|
queryLabel();
|
|
471
|
-
|
|
473
|
+
|
|
474
|
+
if ((0, _businessUtil.isPlatform)()) {
|
|
475
|
+
queryStore();
|
|
476
|
+
}
|
|
472
477
|
}, []);
|
|
473
478
|
(0, _react.useEffect)(function () {
|
|
474
479
|
setSelectedList(defaultList);
|
|
@@ -593,7 +598,7 @@ var ProductModal = function ProductModal(props) {
|
|
|
593
598
|
key: item.catgId,
|
|
594
599
|
value: item.brandId
|
|
595
600
|
}, item.brandName);
|
|
596
|
-
}))), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
601
|
+
}))), (0, _businessUtil.isPlatform)() && /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
597
602
|
label: "Store"
|
|
598
603
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
599
604
|
className: "inputStyle",
|
package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js
CHANGED
|
@@ -275,7 +275,7 @@ function (_super) {
|
|
|
275
275
|
];
|
|
276
276
|
return [4
|
|
277
277
|
/*yield*/
|
|
278
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/brands
|
|
278
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/stores/contract/brands")];
|
|
279
279
|
|
|
280
280
|
case 3:
|
|
281
281
|
res = _a.sent();
|
package/es/utils/businessUtil.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.renderPreview = exports.parseUrl = exports.newParseUrl = exports.listToTree = exports.getPromotionList = exports.computeStyle = exports.canNumber = void 0;
|
|
6
|
+
exports.renderPreview = exports.parseUrl = exports.newParseUrl = exports.listToTree = exports.isPlatform = exports.getPromotionList = exports.computeStyle = exports.canNumber = void 0;
|
|
7
7
|
|
|
8
8
|
var _qs = _interopRequireDefault(require("qs"));
|
|
9
9
|
|
|
@@ -16,6 +16,12 @@ var _constants = require("../constants");
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
17
|
|
|
18
18
|
/* eslint-disable import/no-cycle */
|
|
19
|
+
var isPlatform = function isPlatform() {
|
|
20
|
+
return window.magicDesign.partyType === 'P';
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
exports.isPlatform = isPlatform;
|
|
24
|
+
|
|
19
25
|
var newParseUrl = function newParseUrl(urlObj) {
|
|
20
26
|
var link = urlObj.value;
|
|
21
27
|
var params;
|
package/es/utils/commonUtil.js
CHANGED
|
@@ -214,7 +214,8 @@ function commonFetch(url, data, method) {
|
|
|
214
214
|
var credentials = localStorage.getItem('credentials');
|
|
215
215
|
var headers = {
|
|
216
216
|
'Content-Type': 'application/json; charset=UTF-8',
|
|
217
|
-
credentials: credentials
|
|
217
|
+
credentials: credentials,
|
|
218
|
+
accessToken: credentials
|
|
218
219
|
};
|
|
219
220
|
|
|
220
221
|
if (_method === 'GET') {
|
|
@@ -716,9 +717,9 @@ var asyncNextTick = function asyncNextTick(asyncFunc, interval, count) {
|
|
|
716
717
|
exports.asyncNextTick = asyncNextTick;
|
|
717
718
|
|
|
718
719
|
var convertToRem = function convertToRem(value) {
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
}
|
|
720
|
+
return value;
|
|
721
|
+
|
|
722
|
+
if (window.magicDesign.device === 'pc' || window.magicDesign.mode === 'designer') {}
|
|
722
723
|
|
|
723
724
|
var pxValue = parseFloat(value);
|
|
724
725
|
var remValue = pxValue / 50; // 假设1rem = 50px
|
|
@@ -731,9 +732,9 @@ var convertToRem = function convertToRem(value) {
|
|
|
731
732
|
exports.convertToRem = convertToRem;
|
|
732
733
|
|
|
733
734
|
var pxToRem = function pxToRem(styleObj) {
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
}
|
|
735
|
+
return styleObj;
|
|
736
|
+
|
|
737
|
+
if (window.magicDesign.device === 'pc' || window.magicDesign.mode === 'designer') {}
|
|
737
738
|
|
|
738
739
|
var remObj = {};
|
|
739
740
|
|
|
@@ -13,6 +13,8 @@ var _antd = require("antd");
|
|
|
13
13
|
|
|
14
14
|
var _commonUtil = require("../../../utils/commonUtil");
|
|
15
15
|
|
|
16
|
+
var _businessUtil = require("../../../utils/businessUtil");
|
|
17
|
+
|
|
16
18
|
var _dateUtil = require("../../../utils/dateUtil");
|
|
17
19
|
|
|
18
20
|
require("./index.less");
|
|
@@ -298,7 +300,10 @@ var BundleCampaign = function BundleCampaign(props) {
|
|
|
298
300
|
};
|
|
299
301
|
|
|
300
302
|
(0, _react.useEffect)(function () {
|
|
301
|
-
|
|
303
|
+
if ((0, _businessUtil.isPlatform)()) {
|
|
304
|
+
queryStore();
|
|
305
|
+
}
|
|
306
|
+
|
|
302
307
|
var params = {
|
|
303
308
|
campaignName: campaignName,
|
|
304
309
|
storeId: storeId,
|
|
@@ -335,44 +340,44 @@ var BundleCampaign = function BundleCampaign(props) {
|
|
|
335
340
|
}
|
|
336
341
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
337
342
|
className: "labelStyle"
|
|
338
|
-
}, "
|
|
343
|
+
}, "Campaign State"), /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
339
344
|
className: "inputStyle",
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
},
|
|
343
|
-
optionFilterProp: "children",
|
|
344
|
-
placeholder: "Please select",
|
|
345
|
-
showSearch: true,
|
|
345
|
+
defaultValue: "A,B",
|
|
346
|
+
onChange: changeCamState,
|
|
346
347
|
size: "small",
|
|
347
|
-
value:
|
|
348
|
-
},
|
|
348
|
+
value: cmpState
|
|
349
|
+
}, stateMap && stateMap.length > 0 && stateMap.map(function (v) {
|
|
349
350
|
return /*#__PURE__*/_react["default"].createElement(Option, {
|
|
350
|
-
key: v.
|
|
351
|
-
value: v.
|
|
352
|
-
}, v.
|
|
351
|
+
key: v.key,
|
|
352
|
+
value: v.key
|
|
353
|
+
}, v.value);
|
|
353
354
|
})))), /*#__PURE__*/_react["default"].createElement(_antd.Row, {
|
|
354
355
|
className: "mb12",
|
|
355
356
|
style: {
|
|
356
357
|
width: '100%'
|
|
357
358
|
}
|
|
358
|
-
}, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
359
|
+
}, (0, _businessUtil.isPlatform)() && /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
359
360
|
span: 12,
|
|
360
361
|
style: {
|
|
361
362
|
display: 'flex'
|
|
362
363
|
}
|
|
363
364
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
364
365
|
className: "labelStyle"
|
|
365
|
-
}, "
|
|
366
|
+
}, "Store"), /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
366
367
|
className: "inputStyle",
|
|
367
|
-
|
|
368
|
-
|
|
368
|
+
onChange: function onChange(value) {
|
|
369
|
+
return setStoreId(value);
|
|
370
|
+
},
|
|
371
|
+
optionFilterProp: "children",
|
|
372
|
+
placeholder: "Please select",
|
|
373
|
+
showSearch: true,
|
|
369
374
|
size: "small",
|
|
370
|
-
value:
|
|
371
|
-
},
|
|
375
|
+
value: storeId
|
|
376
|
+
}, storeList && storeList.length > 0 && storeList.map(function (v) {
|
|
372
377
|
return /*#__PURE__*/_react["default"].createElement(Option, {
|
|
373
|
-
key: v.
|
|
374
|
-
value: v.
|
|
375
|
-
}, v.
|
|
378
|
+
key: v.storeId,
|
|
379
|
+
value: v.storeId
|
|
380
|
+
}, v.storeName);
|
|
376
381
|
}))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
377
382
|
span: 12,
|
|
378
383
|
style: {
|
|
@@ -514,7 +514,10 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
514
514
|
queryCategory();
|
|
515
515
|
queryBrand();
|
|
516
516
|
queryLabel();
|
|
517
|
-
|
|
517
|
+
|
|
518
|
+
if ((0, _businessUtil.isPlatform)()) {
|
|
519
|
+
queryStore();
|
|
520
|
+
}
|
|
518
521
|
}, []);
|
|
519
522
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
520
523
|
className: "mFilteredProductModal"
|
|
@@ -559,7 +562,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
559
562
|
key: v.brandId,
|
|
560
563
|
value: v.brandName
|
|
561
564
|
}, v.brandName);
|
|
562
|
-
}))), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
565
|
+
}))), (0, _businessUtil.isPlatform)() && /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
563
566
|
label: "Store"
|
|
564
567
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
565
568
|
className: "inputStyle",
|
|
@@ -15,6 +15,8 @@ var _locale = require("../../../locale");
|
|
|
15
15
|
|
|
16
16
|
var _commonUtil = require("../../../utils/commonUtil");
|
|
17
17
|
|
|
18
|
+
var _businessUtil = require("../../../utils/businessUtil");
|
|
19
|
+
|
|
18
20
|
require("./index.less");
|
|
19
21
|
|
|
20
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -307,7 +309,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
307
309
|
case 0:
|
|
308
310
|
return [4
|
|
309
311
|
/*yield*/
|
|
310
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/brands
|
|
312
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/stores/contract/brands")];
|
|
311
313
|
|
|
312
314
|
case 1:
|
|
313
315
|
res = _a.sent();
|
|
@@ -366,7 +368,10 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
366
368
|
|
|
367
369
|
queryGoods(params);
|
|
368
370
|
queryBrand();
|
|
369
|
-
|
|
371
|
+
|
|
372
|
+
if ((0, _businessUtil.isPlatform)()) {
|
|
373
|
+
queryStore();
|
|
374
|
+
}
|
|
370
375
|
}, []);
|
|
371
376
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
372
377
|
className: "productDetailPage"
|
|
@@ -398,35 +403,6 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
398
403
|
size: "small",
|
|
399
404
|
value: productCode
|
|
400
405
|
}))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
401
|
-
span: 6
|
|
402
|
-
}, /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
403
|
-
onClick: function onClick() {
|
|
404
|
-
setLoading(true);
|
|
405
|
-
paginationParams.pageIndex = 1;
|
|
406
|
-
|
|
407
|
-
var total = paginationParams.total,
|
|
408
|
-
params = __rest(paginationParams, ["total"]);
|
|
409
|
-
|
|
410
|
-
queryGoods(__assign({
|
|
411
|
-
productName: productName,
|
|
412
|
-
productCode: productCode,
|
|
413
|
-
brandIds: brandId.map(function (v) {
|
|
414
|
-
return v.key;
|
|
415
|
-
}).join(',') || '',
|
|
416
|
-
storeId: storeId
|
|
417
|
-
}, params));
|
|
418
|
-
},
|
|
419
|
-
size: "small",
|
|
420
|
-
style: {
|
|
421
|
-
marginRight: 10
|
|
422
|
-
},
|
|
423
|
-
type: "primary"
|
|
424
|
-
}, (0, _locale.i18n)('QUERY')), /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
425
|
-
onClick: function onClick() {
|
|
426
|
-
reset();
|
|
427
|
-
},
|
|
428
|
-
size: "small"
|
|
429
|
-
}, (0, _locale.i18n)('CANCEL'))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
430
406
|
span: 9
|
|
431
407
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
432
408
|
label: "Brand"
|
|
@@ -444,7 +420,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
444
420
|
key: v.brandId,
|
|
445
421
|
value: v.brandName
|
|
446
422
|
}, v.brandName);
|
|
447
|
-
})))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
423
|
+
})))), (0, _businessUtil.isPlatform)() && /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
448
424
|
span: 9
|
|
449
425
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
450
426
|
label: "Store"
|
|
@@ -463,7 +439,36 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
463
439
|
key: v.storeId,
|
|
464
440
|
value: v.storeId
|
|
465
441
|
}, v.storeName);
|
|
466
|
-
}))))
|
|
442
|
+
})))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
443
|
+
span: 6
|
|
444
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
445
|
+
onClick: function onClick() {
|
|
446
|
+
setLoading(true);
|
|
447
|
+
paginationParams.pageIndex = 1;
|
|
448
|
+
|
|
449
|
+
var total = paginationParams.total,
|
|
450
|
+
params = __rest(paginationParams, ["total"]);
|
|
451
|
+
|
|
452
|
+
queryGoods(__assign({
|
|
453
|
+
productName: productName,
|
|
454
|
+
productCode: productCode,
|
|
455
|
+
brandIds: brandId.map(function (v) {
|
|
456
|
+
return v.key;
|
|
457
|
+
}).join(',') || '',
|
|
458
|
+
storeId: storeId
|
|
459
|
+
}, params));
|
|
460
|
+
},
|
|
461
|
+
size: "small",
|
|
462
|
+
style: {
|
|
463
|
+
marginRight: 10
|
|
464
|
+
},
|
|
465
|
+
type: "primary"
|
|
466
|
+
}, (0, _locale.i18n)('QUERY')), /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
467
|
+
onClick: function onClick() {
|
|
468
|
+
reset();
|
|
469
|
+
},
|
|
470
|
+
size: "small"
|
|
471
|
+
}, (0, _locale.i18n)('CANCEL'))))), /*#__PURE__*/_react["default"].createElement(_antd.Table, {
|
|
467
472
|
bordered: false,
|
|
468
473
|
columns: columns,
|
|
469
474
|
dataSource: productList,
|
|
@@ -13,6 +13,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
|
|
14
14
|
var _commonUtil = require("../../utils/commonUtil");
|
|
15
15
|
|
|
16
|
+
var _businessUtil = require("../../utils/businessUtil");
|
|
17
|
+
|
|
16
18
|
var _Iconfont = _interopRequireDefault(require("../Iconfont"));
|
|
17
19
|
|
|
18
20
|
var _currencyUtil = require("../../utils/currencyUtil");
|
|
@@ -468,7 +470,10 @@ var ProductModal = function ProductModal(props) {
|
|
|
468
470
|
queryOfferCatgs();
|
|
469
471
|
queryBrands();
|
|
470
472
|
queryLabel();
|
|
471
|
-
|
|
473
|
+
|
|
474
|
+
if ((0, _businessUtil.isPlatform)()) {
|
|
475
|
+
queryStore();
|
|
476
|
+
}
|
|
472
477
|
}, []);
|
|
473
478
|
(0, _react.useEffect)(function () {
|
|
474
479
|
setSelectedList(defaultList);
|
|
@@ -593,7 +598,7 @@ var ProductModal = function ProductModal(props) {
|
|
|
593
598
|
key: item.catgId,
|
|
594
599
|
value: item.brandId
|
|
595
600
|
}, item.brandName);
|
|
596
|
-
}))), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
601
|
+
}))), (0, _businessUtil.isPlatform)() && /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
597
602
|
label: "Store"
|
|
598
603
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
599
604
|
className: "inputStyle",
|
package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js
CHANGED
|
@@ -275,7 +275,7 @@ function (_super) {
|
|
|
275
275
|
];
|
|
276
276
|
return [4
|
|
277
277
|
/*yield*/
|
|
278
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/brands
|
|
278
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/stores/contract/brands")];
|
|
279
279
|
|
|
280
280
|
case 3:
|
|
281
281
|
res = _a.sent();
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.renderPreview = exports.parseUrl = exports.newParseUrl = exports.listToTree = exports.getPromotionList = exports.computeStyle = exports.canNumber = void 0;
|
|
6
|
+
exports.renderPreview = exports.parseUrl = exports.newParseUrl = exports.listToTree = exports.isPlatform = exports.getPromotionList = exports.computeStyle = exports.canNumber = void 0;
|
|
7
7
|
|
|
8
8
|
var _qs = _interopRequireDefault(require("qs"));
|
|
9
9
|
|
|
@@ -16,6 +16,12 @@ var _constants = require("../constants");
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
17
|
|
|
18
18
|
/* eslint-disable import/no-cycle */
|
|
19
|
+
var isPlatform = function isPlatform() {
|
|
20
|
+
return window.magicDesign.partyType === 'P';
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
exports.isPlatform = isPlatform;
|
|
24
|
+
|
|
19
25
|
var newParseUrl = function newParseUrl(urlObj) {
|
|
20
26
|
var link = urlObj.value;
|
|
21
27
|
var params;
|
package/lib/utils/commonUtil.js
CHANGED
|
@@ -214,7 +214,8 @@ function commonFetch(url, data, method) {
|
|
|
214
214
|
var credentials = localStorage.getItem('credentials');
|
|
215
215
|
var headers = {
|
|
216
216
|
'Content-Type': 'application/json; charset=UTF-8',
|
|
217
|
-
credentials: credentials
|
|
217
|
+
credentials: credentials,
|
|
218
|
+
accessToken: credentials
|
|
218
219
|
};
|
|
219
220
|
|
|
220
221
|
if (_method === 'GET') {
|
|
@@ -716,9 +717,9 @@ var asyncNextTick = function asyncNextTick(asyncFunc, interval, count) {
|
|
|
716
717
|
exports.asyncNextTick = asyncNextTick;
|
|
717
718
|
|
|
718
719
|
var convertToRem = function convertToRem(value) {
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
}
|
|
720
|
+
return value;
|
|
721
|
+
|
|
722
|
+
if (window.magicDesign.device === 'pc' || window.magicDesign.mode === 'designer') {}
|
|
722
723
|
|
|
723
724
|
var pxValue = parseFloat(value);
|
|
724
725
|
var remValue = pxValue / 50; // 假设1rem = 50px
|
|
@@ -731,9 +732,9 @@ var convertToRem = function convertToRem(value) {
|
|
|
731
732
|
exports.convertToRem = convertToRem;
|
|
732
733
|
|
|
733
734
|
var pxToRem = function pxToRem(styleObj) {
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
}
|
|
735
|
+
return styleObj;
|
|
736
|
+
|
|
737
|
+
if (window.magicDesign.device === 'pc' || window.magicDesign.mode === 'designer') {}
|
|
737
738
|
|
|
738
739
|
var remObj = {};
|
|
739
740
|
|