@fonixtree/magic-design 1.0.38 → 1.0.39
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/ProductDetailPage/index.js +24 -21
- package/es/common/ProductModal/index.js +21 -21
- package/es/common/ProductSource/index.js +20 -20
- package/lib/common/LinkModal/ProductDetailPage/index.js +24 -21
- package/lib/common/ProductModal/index.js +21 -21
- package/lib/common/ProductSource/index.js +20 -20
- package/package.json +1 -1
|
@@ -272,7 +272,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
272
272
|
|
|
273
273
|
var queryGoods = function queryGoods() {
|
|
274
274
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
275
|
-
var _list, total, params,
|
|
275
|
+
var _list, total, params, res_1, res;
|
|
276
276
|
|
|
277
277
|
return __generator(this, function (_a) {
|
|
278
278
|
switch (_a.label) {
|
|
@@ -288,24 +288,9 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
288
288
|
pageSize: paginationParams.pageSize,
|
|
289
289
|
pageIndex: paginationParams.current
|
|
290
290
|
};
|
|
291
|
-
if (!(proType === '
|
|
291
|
+
if (!(proType === 'spu')) return [3
|
|
292
292
|
/*break*/
|
|
293
293
|
, 2];
|
|
294
|
-
return [4
|
|
295
|
-
/*yield*/
|
|
296
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/products", __assign(__assign({}, params), {
|
|
297
|
-
productCode: productCode
|
|
298
|
-
}), 'GET')];
|
|
299
|
-
|
|
300
|
-
case 1:
|
|
301
|
-
res = _a.sent();
|
|
302
|
-
_list = (0, _ProductModal.formatData)(res.list || []);
|
|
303
|
-
total = res.total;
|
|
304
|
-
return [3
|
|
305
|
-
/*break*/
|
|
306
|
-
, 4];
|
|
307
|
-
|
|
308
|
-
case 2:
|
|
309
294
|
return [4
|
|
310
295
|
/*yield*/
|
|
311
296
|
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offers", __assign(__assign({}, params), {
|
|
@@ -316,7 +301,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
316
301
|
crmFlag: 'on'
|
|
317
302
|
}), 'GET')];
|
|
318
303
|
|
|
319
|
-
case
|
|
304
|
+
case 1:
|
|
320
305
|
res_1 = _a.sent();
|
|
321
306
|
_list = (0, _ProductModal.formatData)((0, _commonUtil.ensure)(function () {
|
|
322
307
|
return res_1.list.map(function (m) {
|
|
@@ -324,6 +309,21 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
324
309
|
});
|
|
325
310
|
}, []), proType);
|
|
326
311
|
total = res_1.total;
|
|
312
|
+
return [3
|
|
313
|
+
/*break*/
|
|
314
|
+
, 4];
|
|
315
|
+
|
|
316
|
+
case 2:
|
|
317
|
+
return [4
|
|
318
|
+
/*yield*/
|
|
319
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/products", __assign(__assign({}, params), {
|
|
320
|
+
productCode: productCode
|
|
321
|
+
}), 'GET')];
|
|
322
|
+
|
|
323
|
+
case 3:
|
|
324
|
+
res = _a.sent();
|
|
325
|
+
_list = (0, _ProductModal.formatData)(res.list || []);
|
|
326
|
+
total = res.total;
|
|
327
327
|
_a.label = 4;
|
|
328
328
|
|
|
329
329
|
case 4:
|
|
@@ -401,14 +401,17 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
401
401
|
};
|
|
402
402
|
|
|
403
403
|
(0, _react.useEffect)(function () {
|
|
404
|
-
setLoading(true);
|
|
405
|
-
queryGoods();
|
|
406
404
|
queryBrand();
|
|
407
405
|
|
|
408
406
|
if ((0, _businessUtil.isPlatform)()) {
|
|
409
407
|
queryStore();
|
|
410
408
|
}
|
|
411
409
|
}, []);
|
|
410
|
+
(0, _react.useEffect)(function () {
|
|
411
|
+
setLoading(true);
|
|
412
|
+
paginationParams.current = 1;
|
|
413
|
+
queryGoods();
|
|
414
|
+
}, [proType]);
|
|
412
415
|
var proTypeOption = [{
|
|
413
416
|
label: 'SKU',
|
|
414
417
|
value: 'sku'
|
|
@@ -452,7 +455,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
452
455
|
}))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
453
456
|
span: 9
|
|
454
457
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
455
|
-
label: proType === '
|
|
458
|
+
label: proType === 'spu' ? 'SPU Code' : 'SKU Code'
|
|
456
459
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
|
|
457
460
|
onChange: function onChange(e) {
|
|
458
461
|
return setProductCode(e.target.value);
|
|
@@ -352,7 +352,7 @@ var ProductModal = function ProductModal(props) {
|
|
|
352
352
|
|
|
353
353
|
var queryGoods = function queryGoods() {
|
|
354
354
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
355
|
-
var _list, total, params,
|
|
355
|
+
var _list, total, params, res_1, res;
|
|
356
356
|
|
|
357
357
|
return __generator(this, function (_a) {
|
|
358
358
|
switch (_a.label) {
|
|
@@ -374,24 +374,9 @@ var ProductModal = function ProductModal(props) {
|
|
|
374
374
|
pageIndex: paginationParams.current,
|
|
375
375
|
state: 'A'
|
|
376
376
|
};
|
|
377
|
-
if (!(proType === '
|
|
377
|
+
if (!(proType === 'spu')) return [3
|
|
378
378
|
/*break*/
|
|
379
379
|
, 2];
|
|
380
|
-
return [4
|
|
381
|
-
/*yield*/
|
|
382
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/products", __assign(__assign({}, params), {
|
|
383
|
-
productCode: productCode
|
|
384
|
-
}), 'GET')];
|
|
385
|
-
|
|
386
|
-
case 1:
|
|
387
|
-
res = _a.sent();
|
|
388
|
-
_list = formatData(res.list || []);
|
|
389
|
-
total = res.total;
|
|
390
|
-
return [3
|
|
391
|
-
/*break*/
|
|
392
|
-
, 4];
|
|
393
|
-
|
|
394
|
-
case 2:
|
|
395
380
|
return [4
|
|
396
381
|
/*yield*/
|
|
397
382
|
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offers", __assign(__assign({}, params), {
|
|
@@ -402,7 +387,7 @@ var ProductModal = function ProductModal(props) {
|
|
|
402
387
|
crmFlag: 'on'
|
|
403
388
|
}), 'GET')];
|
|
404
389
|
|
|
405
|
-
case
|
|
390
|
+
case 1:
|
|
406
391
|
res_1 = _a.sent();
|
|
407
392
|
_list = formatData((0, _commonUtil.ensure)(function () {
|
|
408
393
|
return res_1.list.map(function (m) {
|
|
@@ -410,6 +395,21 @@ var ProductModal = function ProductModal(props) {
|
|
|
410
395
|
});
|
|
411
396
|
}, []), proType);
|
|
412
397
|
total = res_1.total;
|
|
398
|
+
return [3
|
|
399
|
+
/*break*/
|
|
400
|
+
, 4];
|
|
401
|
+
|
|
402
|
+
case 2:
|
|
403
|
+
return [4
|
|
404
|
+
/*yield*/
|
|
405
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/products", __assign(__assign({}, params), {
|
|
406
|
+
productCode: productCode
|
|
407
|
+
}), 'GET')];
|
|
408
|
+
|
|
409
|
+
case 3:
|
|
410
|
+
res = _a.sent();
|
|
411
|
+
_list = formatData(res.list || []);
|
|
412
|
+
total = res.total;
|
|
413
413
|
_a.label = 4;
|
|
414
414
|
|
|
415
415
|
case 4:
|
|
@@ -565,8 +565,8 @@ var ProductModal = function ProductModal(props) {
|
|
|
565
565
|
width: 120,
|
|
566
566
|
ellipsis: true
|
|
567
567
|
}, {
|
|
568
|
-
title: proType === '
|
|
569
|
-
dataIndex: proType === '
|
|
568
|
+
title: proType === 'spu' ? (0, _locale.i18n)('SPU_CODE') : (0, _locale.i18n)('SKU_CODE'),
|
|
569
|
+
dataIndex: proType === 'spu' ? 'offerCode' : 'productCode',
|
|
570
570
|
width: 120,
|
|
571
571
|
ellipsis: true
|
|
572
572
|
}, _defineProperty({
|
|
@@ -713,7 +713,7 @@ var ProductModal = function ProductModal(props) {
|
|
|
713
713
|
size: "small",
|
|
714
714
|
value: productName
|
|
715
715
|
})), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
716
|
-
label: proType === '
|
|
716
|
+
label: proType === 'spu' ? 'SPU Code' : 'SKU Code'
|
|
717
717
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
|
|
718
718
|
className: "inputStyle",
|
|
719
719
|
onChange: function onChange(e) {
|
|
@@ -201,33 +201,16 @@ function ProductSource(_a) {
|
|
|
201
201
|
|
|
202
202
|
var onSelectProduct = function onSelectProduct() {
|
|
203
203
|
return __awaiter(_this, void 0, void 0, function () {
|
|
204
|
-
var url, param,
|
|
204
|
+
var url, param, list_1, url, param, list;
|
|
205
205
|
return __generator(this, function (_a) {
|
|
206
206
|
switch (_a.label) {
|
|
207
207
|
case 0:
|
|
208
208
|
if (!(value && value.length > 0)) return [3
|
|
209
209
|
/*break*/
|
|
210
210
|
, 5];
|
|
211
|
-
if (!(prodType === '
|
|
211
|
+
if (!(prodType === 'spu')) return [3
|
|
212
212
|
/*break*/
|
|
213
213
|
, 2];
|
|
214
|
-
url = "/designer/v1/" + window.magicDesign.MBaseUrl + "/products";
|
|
215
|
-
param = {
|
|
216
|
-
products: value,
|
|
217
|
-
state: 'A'
|
|
218
|
-
};
|
|
219
|
-
return [4
|
|
220
|
-
/*yield*/
|
|
221
|
-
, (0, _commonUtil.commonFetch)(url, param, 'GET')];
|
|
222
|
-
|
|
223
|
-
case 1:
|
|
224
|
-
list = _a.sent().list;
|
|
225
|
-
setSelectedProds((0, _ProductModal.formatData)(list || []));
|
|
226
|
-
return [3
|
|
227
|
-
/*break*/
|
|
228
|
-
, 4];
|
|
229
|
-
|
|
230
|
-
case 2:
|
|
231
214
|
url = "/designer/v1/" + window.magicDesign.MBaseUrl + "/offers";
|
|
232
215
|
param = {
|
|
233
216
|
offers: value,
|
|
@@ -241,13 +224,30 @@ function ProductSource(_a) {
|
|
|
241
224
|
/*yield*/
|
|
242
225
|
, (0, _commonUtil.commonFetch)(url, param, 'GET')];
|
|
243
226
|
|
|
244
|
-
case
|
|
227
|
+
case 1:
|
|
245
228
|
list_1 = _a.sent().list;
|
|
246
229
|
setSelectedProds((0, _ProductModal.formatData)((0, _commonUtil.ensure)(function () {
|
|
247
230
|
return list_1.map(function (m) {
|
|
248
231
|
return __assign(__assign({}, m.products[0]), m);
|
|
249
232
|
});
|
|
250
233
|
}, []), prodType));
|
|
234
|
+
return [3
|
|
235
|
+
/*break*/
|
|
236
|
+
, 4];
|
|
237
|
+
|
|
238
|
+
case 2:
|
|
239
|
+
url = "/designer/v1/" + window.magicDesign.MBaseUrl + "/products";
|
|
240
|
+
param = {
|
|
241
|
+
products: value,
|
|
242
|
+
state: 'A'
|
|
243
|
+
};
|
|
244
|
+
return [4
|
|
245
|
+
/*yield*/
|
|
246
|
+
, (0, _commonUtil.commonFetch)(url, param, 'GET')];
|
|
247
|
+
|
|
248
|
+
case 3:
|
|
249
|
+
list = _a.sent().list;
|
|
250
|
+
setSelectedProds((0, _ProductModal.formatData)(list || []));
|
|
251
251
|
_a.label = 4;
|
|
252
252
|
|
|
253
253
|
case 4:
|
|
@@ -272,7 +272,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
272
272
|
|
|
273
273
|
var queryGoods = function queryGoods() {
|
|
274
274
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
275
|
-
var _list, total, params,
|
|
275
|
+
var _list, total, params, res_1, res;
|
|
276
276
|
|
|
277
277
|
return __generator(this, function (_a) {
|
|
278
278
|
switch (_a.label) {
|
|
@@ -288,24 +288,9 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
288
288
|
pageSize: paginationParams.pageSize,
|
|
289
289
|
pageIndex: paginationParams.current
|
|
290
290
|
};
|
|
291
|
-
if (!(proType === '
|
|
291
|
+
if (!(proType === 'spu')) return [3
|
|
292
292
|
/*break*/
|
|
293
293
|
, 2];
|
|
294
|
-
return [4
|
|
295
|
-
/*yield*/
|
|
296
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/products", __assign(__assign({}, params), {
|
|
297
|
-
productCode: productCode
|
|
298
|
-
}), 'GET')];
|
|
299
|
-
|
|
300
|
-
case 1:
|
|
301
|
-
res = _a.sent();
|
|
302
|
-
_list = (0, _ProductModal.formatData)(res.list || []);
|
|
303
|
-
total = res.total;
|
|
304
|
-
return [3
|
|
305
|
-
/*break*/
|
|
306
|
-
, 4];
|
|
307
|
-
|
|
308
|
-
case 2:
|
|
309
294
|
return [4
|
|
310
295
|
/*yield*/
|
|
311
296
|
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offers", __assign(__assign({}, params), {
|
|
@@ -316,7 +301,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
316
301
|
crmFlag: 'on'
|
|
317
302
|
}), 'GET')];
|
|
318
303
|
|
|
319
|
-
case
|
|
304
|
+
case 1:
|
|
320
305
|
res_1 = _a.sent();
|
|
321
306
|
_list = (0, _ProductModal.formatData)((0, _commonUtil.ensure)(function () {
|
|
322
307
|
return res_1.list.map(function (m) {
|
|
@@ -324,6 +309,21 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
324
309
|
});
|
|
325
310
|
}, []), proType);
|
|
326
311
|
total = res_1.total;
|
|
312
|
+
return [3
|
|
313
|
+
/*break*/
|
|
314
|
+
, 4];
|
|
315
|
+
|
|
316
|
+
case 2:
|
|
317
|
+
return [4
|
|
318
|
+
/*yield*/
|
|
319
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/products", __assign(__assign({}, params), {
|
|
320
|
+
productCode: productCode
|
|
321
|
+
}), 'GET')];
|
|
322
|
+
|
|
323
|
+
case 3:
|
|
324
|
+
res = _a.sent();
|
|
325
|
+
_list = (0, _ProductModal.formatData)(res.list || []);
|
|
326
|
+
total = res.total;
|
|
327
327
|
_a.label = 4;
|
|
328
328
|
|
|
329
329
|
case 4:
|
|
@@ -401,14 +401,17 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
401
401
|
};
|
|
402
402
|
|
|
403
403
|
(0, _react.useEffect)(function () {
|
|
404
|
-
setLoading(true);
|
|
405
|
-
queryGoods();
|
|
406
404
|
queryBrand();
|
|
407
405
|
|
|
408
406
|
if ((0, _businessUtil.isPlatform)()) {
|
|
409
407
|
queryStore();
|
|
410
408
|
}
|
|
411
409
|
}, []);
|
|
410
|
+
(0, _react.useEffect)(function () {
|
|
411
|
+
setLoading(true);
|
|
412
|
+
paginationParams.current = 1;
|
|
413
|
+
queryGoods();
|
|
414
|
+
}, [proType]);
|
|
412
415
|
var proTypeOption = [{
|
|
413
416
|
label: 'SKU',
|
|
414
417
|
value: 'sku'
|
|
@@ -452,7 +455,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
452
455
|
}))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
453
456
|
span: 9
|
|
454
457
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
455
|
-
label: proType === '
|
|
458
|
+
label: proType === 'spu' ? 'SPU Code' : 'SKU Code'
|
|
456
459
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
|
|
457
460
|
onChange: function onChange(e) {
|
|
458
461
|
return setProductCode(e.target.value);
|
|
@@ -352,7 +352,7 @@ var ProductModal = function ProductModal(props) {
|
|
|
352
352
|
|
|
353
353
|
var queryGoods = function queryGoods() {
|
|
354
354
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
355
|
-
var _list, total, params,
|
|
355
|
+
var _list, total, params, res_1, res;
|
|
356
356
|
|
|
357
357
|
return __generator(this, function (_a) {
|
|
358
358
|
switch (_a.label) {
|
|
@@ -374,24 +374,9 @@ var ProductModal = function ProductModal(props) {
|
|
|
374
374
|
pageIndex: paginationParams.current,
|
|
375
375
|
state: 'A'
|
|
376
376
|
};
|
|
377
|
-
if (!(proType === '
|
|
377
|
+
if (!(proType === 'spu')) return [3
|
|
378
378
|
/*break*/
|
|
379
379
|
, 2];
|
|
380
|
-
return [4
|
|
381
|
-
/*yield*/
|
|
382
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/products", __assign(__assign({}, params), {
|
|
383
|
-
productCode: productCode
|
|
384
|
-
}), 'GET')];
|
|
385
|
-
|
|
386
|
-
case 1:
|
|
387
|
-
res = _a.sent();
|
|
388
|
-
_list = formatData(res.list || []);
|
|
389
|
-
total = res.total;
|
|
390
|
-
return [3
|
|
391
|
-
/*break*/
|
|
392
|
-
, 4];
|
|
393
|
-
|
|
394
|
-
case 2:
|
|
395
380
|
return [4
|
|
396
381
|
/*yield*/
|
|
397
382
|
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offers", __assign(__assign({}, params), {
|
|
@@ -402,7 +387,7 @@ var ProductModal = function ProductModal(props) {
|
|
|
402
387
|
crmFlag: 'on'
|
|
403
388
|
}), 'GET')];
|
|
404
389
|
|
|
405
|
-
case
|
|
390
|
+
case 1:
|
|
406
391
|
res_1 = _a.sent();
|
|
407
392
|
_list = formatData((0, _commonUtil.ensure)(function () {
|
|
408
393
|
return res_1.list.map(function (m) {
|
|
@@ -410,6 +395,21 @@ var ProductModal = function ProductModal(props) {
|
|
|
410
395
|
});
|
|
411
396
|
}, []), proType);
|
|
412
397
|
total = res_1.total;
|
|
398
|
+
return [3
|
|
399
|
+
/*break*/
|
|
400
|
+
, 4];
|
|
401
|
+
|
|
402
|
+
case 2:
|
|
403
|
+
return [4
|
|
404
|
+
/*yield*/
|
|
405
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/products", __assign(__assign({}, params), {
|
|
406
|
+
productCode: productCode
|
|
407
|
+
}), 'GET')];
|
|
408
|
+
|
|
409
|
+
case 3:
|
|
410
|
+
res = _a.sent();
|
|
411
|
+
_list = formatData(res.list || []);
|
|
412
|
+
total = res.total;
|
|
413
413
|
_a.label = 4;
|
|
414
414
|
|
|
415
415
|
case 4:
|
|
@@ -565,8 +565,8 @@ var ProductModal = function ProductModal(props) {
|
|
|
565
565
|
width: 120,
|
|
566
566
|
ellipsis: true
|
|
567
567
|
}, {
|
|
568
|
-
title: proType === '
|
|
569
|
-
dataIndex: proType === '
|
|
568
|
+
title: proType === 'spu' ? (0, _locale.i18n)('SPU_CODE') : (0, _locale.i18n)('SKU_CODE'),
|
|
569
|
+
dataIndex: proType === 'spu' ? 'offerCode' : 'productCode',
|
|
570
570
|
width: 120,
|
|
571
571
|
ellipsis: true
|
|
572
572
|
}, _defineProperty({
|
|
@@ -713,7 +713,7 @@ var ProductModal = function ProductModal(props) {
|
|
|
713
713
|
size: "small",
|
|
714
714
|
value: productName
|
|
715
715
|
})), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
716
|
-
label: proType === '
|
|
716
|
+
label: proType === 'spu' ? 'SPU Code' : 'SKU Code'
|
|
717
717
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
|
|
718
718
|
className: "inputStyle",
|
|
719
719
|
onChange: function onChange(e) {
|
|
@@ -201,33 +201,16 @@ function ProductSource(_a) {
|
|
|
201
201
|
|
|
202
202
|
var onSelectProduct = function onSelectProduct() {
|
|
203
203
|
return __awaiter(_this, void 0, void 0, function () {
|
|
204
|
-
var url, param,
|
|
204
|
+
var url, param, list_1, url, param, list;
|
|
205
205
|
return __generator(this, function (_a) {
|
|
206
206
|
switch (_a.label) {
|
|
207
207
|
case 0:
|
|
208
208
|
if (!(value && value.length > 0)) return [3
|
|
209
209
|
/*break*/
|
|
210
210
|
, 5];
|
|
211
|
-
if (!(prodType === '
|
|
211
|
+
if (!(prodType === 'spu')) return [3
|
|
212
212
|
/*break*/
|
|
213
213
|
, 2];
|
|
214
|
-
url = "/designer/v1/" + window.magicDesign.MBaseUrl + "/products";
|
|
215
|
-
param = {
|
|
216
|
-
products: value,
|
|
217
|
-
state: 'A'
|
|
218
|
-
};
|
|
219
|
-
return [4
|
|
220
|
-
/*yield*/
|
|
221
|
-
, (0, _commonUtil.commonFetch)(url, param, 'GET')];
|
|
222
|
-
|
|
223
|
-
case 1:
|
|
224
|
-
list = _a.sent().list;
|
|
225
|
-
setSelectedProds((0, _ProductModal.formatData)(list || []));
|
|
226
|
-
return [3
|
|
227
|
-
/*break*/
|
|
228
|
-
, 4];
|
|
229
|
-
|
|
230
|
-
case 2:
|
|
231
214
|
url = "/designer/v1/" + window.magicDesign.MBaseUrl + "/offers";
|
|
232
215
|
param = {
|
|
233
216
|
offers: value,
|
|
@@ -241,13 +224,30 @@ function ProductSource(_a) {
|
|
|
241
224
|
/*yield*/
|
|
242
225
|
, (0, _commonUtil.commonFetch)(url, param, 'GET')];
|
|
243
226
|
|
|
244
|
-
case
|
|
227
|
+
case 1:
|
|
245
228
|
list_1 = _a.sent().list;
|
|
246
229
|
setSelectedProds((0, _ProductModal.formatData)((0, _commonUtil.ensure)(function () {
|
|
247
230
|
return list_1.map(function (m) {
|
|
248
231
|
return __assign(__assign({}, m.products[0]), m);
|
|
249
232
|
});
|
|
250
233
|
}, []), prodType));
|
|
234
|
+
return [3
|
|
235
|
+
/*break*/
|
|
236
|
+
, 4];
|
|
237
|
+
|
|
238
|
+
case 2:
|
|
239
|
+
url = "/designer/v1/" + window.magicDesign.MBaseUrl + "/products";
|
|
240
|
+
param = {
|
|
241
|
+
products: value,
|
|
242
|
+
state: 'A'
|
|
243
|
+
};
|
|
244
|
+
return [4
|
|
245
|
+
/*yield*/
|
|
246
|
+
, (0, _commonUtil.commonFetch)(url, param, 'GET')];
|
|
247
|
+
|
|
248
|
+
case 3:
|
|
249
|
+
list = _a.sent().list;
|
|
250
|
+
setSelectedProds((0, _ProductModal.formatData)(list || []));
|
|
251
251
|
_a.label = 4;
|
|
252
252
|
|
|
253
253
|
case 4:
|