@fonixtree/magic-design 0.0.49 → 0.0.51
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/less/cylon-antd.less +32526 -32526
- package/es/common/LinkModal/BundleCampaign/index.js +390 -0
- package/es/common/LinkModal/BundleCampaign/index.less +17 -0
- package/es/common/LinkModal/CatgTable/index.js +1 -1
- package/es/common/LinkModal/CouponTable/index.js +2 -2
- package/es/common/LinkModal/CustomTable/index.js +1 -1
- package/es/common/LinkModal/FilteredProductModal/index.js +72 -24
- package/es/common/LinkModal/FunctionTable/index.js +1 -1
- package/es/common/LinkModal/ProductDetailPage/index.js +96 -23
- package/es/common/LinkModal/index.js +7 -1
- package/es/common/LinkModal/index.less +1 -1
- package/es/common/ProductModal/index.js +75 -36
- package/es/common/ProductSource/index.js +3 -1
- package/es/composite-comp/common/components/ImageLabel/index.js +2 -2
- package/es/composite-comp/common/components/ImageLabel/index.less +6 -2
- package/es/composite-comp/common/components/ProductItem/index.less +6 -7
- package/es/composite-comp/dito/components/Recommend/defaultJSON.js +8 -2
- package/es/composite-comp/dito/components/Recommend/index.js +5 -1
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +32 -29
- package/es/composite-comp/dito/components/Recommend/pc/index.js +5 -3
- package/es/composite-comp/dito/components/Recommend/pc/index.less +4 -1
- package/es/composite-comp/dito/config-panels/RecommendConfig/index.js +17 -3
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +27 -15
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.less +14 -1
- package/es/constants/layout.js +24 -6
- package/es/core/Designer/PageCompList/index.less +10 -10
- package/es/locale/index.js +3 -1
- package/es/meta-comp/components/Image/index.js +6 -3
- package/lib/assets/less/cylon-antd.less +32526 -32526
- package/lib/common/LinkModal/BundleCampaign/index.js +390 -0
- package/lib/common/LinkModal/BundleCampaign/index.less +17 -0
- package/lib/common/LinkModal/CatgTable/index.js +1 -1
- package/lib/common/LinkModal/CouponTable/index.js +2 -2
- package/lib/common/LinkModal/CustomTable/index.js +1 -1
- package/lib/common/LinkModal/FilteredProductModal/index.js +72 -24
- package/lib/common/LinkModal/FunctionTable/index.js +1 -1
- package/lib/common/LinkModal/ProductDetailPage/index.js +96 -23
- package/lib/common/LinkModal/index.js +7 -1
- package/lib/common/LinkModal/index.less +1 -1
- package/lib/common/ProductModal/index.js +75 -36
- package/lib/common/ProductSource/index.js +3 -1
- package/lib/composite-comp/common/components/ImageLabel/index.js +2 -2
- package/lib/composite-comp/common/components/ImageLabel/index.less +6 -2
- package/lib/composite-comp/common/components/ProductItem/index.less +6 -7
- package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +8 -2
- package/lib/composite-comp/dito/components/Recommend/index.js +5 -1
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +32 -29
- package/lib/composite-comp/dito/components/Recommend/pc/index.js +5 -3
- package/lib/composite-comp/dito/components/Recommend/pc/index.less +4 -1
- package/lib/composite-comp/dito/config-panels/RecommendConfig/index.js +17 -3
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +27 -15
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.less +14 -1
- package/lib/constants/layout.js +24 -6
- package/lib/core/Designer/PageCompList/index.less +10 -10
- package/lib/locale/index.js +3 -1
- package/lib/meta-comp/components/Image/index.js +6 -3
- package/package.json +1 -1
|
@@ -206,9 +206,9 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
206
206
|
brandData = _b[0],
|
|
207
207
|
setBrandData = _b[1];
|
|
208
208
|
|
|
209
|
-
var _c = (0, _react.useState)(
|
|
209
|
+
var _c = (0, _react.useState)([]),
|
|
210
210
|
brandId = _c[0],
|
|
211
|
-
|
|
211
|
+
setBrandId = _c[1];
|
|
212
212
|
|
|
213
213
|
var _d = (0, _react.useState)(''),
|
|
214
214
|
productCode = _d[0],
|
|
@@ -218,16 +218,24 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
218
218
|
productName = _e[0],
|
|
219
219
|
setProductName = _e[1];
|
|
220
220
|
|
|
221
|
-
var _f = (0, _react.useState)(
|
|
222
|
-
|
|
223
|
-
|
|
221
|
+
var _f = (0, _react.useState)([]),
|
|
222
|
+
storeId = _f[0],
|
|
223
|
+
setStoreId = _f[1];
|
|
224
224
|
|
|
225
|
-
var _g = (0, _react.useState)(
|
|
225
|
+
var _g = (0, _react.useState)([]),
|
|
226
|
+
storeList = _g[0],
|
|
227
|
+
setStoreList = _g[1];
|
|
228
|
+
|
|
229
|
+
var _h = (0, _react.useState)(false),
|
|
230
|
+
loading = _h[0],
|
|
231
|
+
setLoading = _h[1];
|
|
232
|
+
|
|
233
|
+
var _j = (0, _react.useState)({
|
|
226
234
|
pageSize: 20,
|
|
227
235
|
current: 1
|
|
228
236
|
}),
|
|
229
|
-
paginationParams =
|
|
230
|
-
setPaginationParams =
|
|
237
|
+
paginationParams = _j[0],
|
|
238
|
+
setPaginationParams = _j[1];
|
|
231
239
|
|
|
232
240
|
var columns = [{
|
|
233
241
|
title: 'Image',
|
|
@@ -250,7 +258,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
250
258
|
dataIndex: 'attrValues',
|
|
251
259
|
ellipsis: true
|
|
252
260
|
}, {
|
|
253
|
-
title: '
|
|
261
|
+
title: 'Store',
|
|
254
262
|
dataIndex: 'storeName',
|
|
255
263
|
width: 150,
|
|
256
264
|
ellipsis: true
|
|
@@ -307,16 +315,44 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
307
315
|
}
|
|
308
316
|
});
|
|
309
317
|
});
|
|
318
|
+
}; // 请求店铺列表
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
var queryStore = function queryStore() {
|
|
322
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
323
|
+
var res;
|
|
324
|
+
return __generator(this, function (_a) {
|
|
325
|
+
switch (_a.label) {
|
|
326
|
+
case 0:
|
|
327
|
+
return [4
|
|
328
|
+
/*yield*/
|
|
329
|
+
, (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/stores/list", {}, 'GET')];
|
|
330
|
+
|
|
331
|
+
case 1:
|
|
332
|
+
res = _a.sent();
|
|
333
|
+
setStoreList(res);
|
|
334
|
+
return [2
|
|
335
|
+
/*return*/
|
|
336
|
+
];
|
|
337
|
+
}
|
|
338
|
+
});
|
|
339
|
+
});
|
|
310
340
|
};
|
|
311
341
|
|
|
312
342
|
var handleBrandChange = function handleBrandChange(value, node) {
|
|
313
|
-
|
|
343
|
+
setBrandId(node.map(function (v) {
|
|
344
|
+
return {
|
|
345
|
+
key: v.key,
|
|
346
|
+
value: v.value
|
|
347
|
+
};
|
|
348
|
+
}));
|
|
314
349
|
};
|
|
315
350
|
|
|
316
351
|
var reset = function reset() {
|
|
317
352
|
setProductName('');
|
|
318
353
|
setProductCode('');
|
|
319
|
-
|
|
354
|
+
setBrandId([]);
|
|
355
|
+
setStoreId([]);
|
|
320
356
|
};
|
|
321
357
|
|
|
322
358
|
(0, _react.useEffect)(function () {
|
|
@@ -327,6 +363,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
327
363
|
|
|
328
364
|
queryGoods(params);
|
|
329
365
|
queryBrand();
|
|
366
|
+
queryStore();
|
|
330
367
|
}, []);
|
|
331
368
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
332
369
|
className: "productDetailPage"
|
|
@@ -340,17 +377,23 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
340
377
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
341
378
|
span: 9
|
|
342
379
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
343
|
-
label: "Product Name"
|
|
344
|
-
name: "productName"
|
|
380
|
+
label: "Product Name"
|
|
345
381
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
|
|
346
|
-
|
|
382
|
+
onChange: function onChange(e) {
|
|
383
|
+
return setProductName(e.target.value);
|
|
384
|
+
},
|
|
385
|
+
size: "small",
|
|
386
|
+
value: productName
|
|
347
387
|
}))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
348
388
|
span: 9
|
|
349
389
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
350
|
-
label: "SKU Code"
|
|
351
|
-
name: "productCode"
|
|
390
|
+
label: "SKU Code"
|
|
352
391
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
|
|
353
|
-
|
|
392
|
+
onChange: function onChange(e) {
|
|
393
|
+
return setProductCode(e.target.value);
|
|
394
|
+
},
|
|
395
|
+
size: "small",
|
|
396
|
+
value: productCode
|
|
354
397
|
}))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
355
398
|
span: 6
|
|
356
399
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
@@ -364,7 +407,10 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
364
407
|
queryGoods(__assign({
|
|
365
408
|
productName: productName,
|
|
366
409
|
productCode: productCode,
|
|
367
|
-
brandIds: brandId.
|
|
410
|
+
brandIds: brandId.map(function (v) {
|
|
411
|
+
return v.key;
|
|
412
|
+
}).join(',') || '',
|
|
413
|
+
storeId: storeId
|
|
368
414
|
}, params));
|
|
369
415
|
},
|
|
370
416
|
size: "small",
|
|
@@ -380,16 +426,40 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
380
426
|
}, (0, _locale.i18n)('CANCEL'))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
381
427
|
span: 9
|
|
382
428
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
383
|
-
label: "Brand"
|
|
384
|
-
name: "brandId"
|
|
429
|
+
label: "Brand"
|
|
385
430
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
431
|
+
defaultValue: [],
|
|
432
|
+
mode: "multiple",
|
|
433
|
+
onChange: handleBrandChange,
|
|
386
434
|
placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
|
|
387
|
-
size: "small"
|
|
435
|
+
size: "small",
|
|
436
|
+
value: brandId.map(function (v) {
|
|
437
|
+
return v.value;
|
|
438
|
+
})
|
|
388
439
|
}, brandData && brandData.length > 0 && brandData.map(function (v) {
|
|
389
440
|
return /*#__PURE__*/_react["default"].createElement(Option, {
|
|
390
441
|
key: v.brandId,
|
|
391
442
|
value: v.brandName
|
|
392
443
|
}, v.brandName);
|
|
444
|
+
})))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
445
|
+
span: 9
|
|
446
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
447
|
+
label: "Store"
|
|
448
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
449
|
+
defaultValue: [],
|
|
450
|
+
onChange: function onChange(value) {
|
|
451
|
+
return setStoreId(value);
|
|
452
|
+
},
|
|
453
|
+
optionFilterProp: "children",
|
|
454
|
+
placeholder: "Please select",
|
|
455
|
+
showSearch: true,
|
|
456
|
+
size: "small",
|
|
457
|
+
value: storeId
|
|
458
|
+
}, storeList && storeList.length > 0 && storeList.map(function (v) {
|
|
459
|
+
return /*#__PURE__*/_react["default"].createElement(Option, {
|
|
460
|
+
key: v.storeId,
|
|
461
|
+
value: v.storeId
|
|
462
|
+
}, v.storeName);
|
|
393
463
|
})))))), /*#__PURE__*/_react["default"].createElement(_antd.Table, {
|
|
394
464
|
bordered: false,
|
|
395
465
|
columns: columns,
|
|
@@ -406,7 +476,10 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
406
476
|
queryGoods(__assign({
|
|
407
477
|
productName: productName,
|
|
408
478
|
productCode: productCode,
|
|
409
|
-
brandIds: brandId.
|
|
479
|
+
brandIds: brandId.map(function (v) {
|
|
480
|
+
return v.key;
|
|
481
|
+
}).join(',') || '',
|
|
482
|
+
storeId: storeId
|
|
410
483
|
}, params));
|
|
411
484
|
},
|
|
412
485
|
showSizeChanger: false
|
|
@@ -414,7 +487,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
414
487
|
rowKey: "productId",
|
|
415
488
|
rowSelection: rowSelection,
|
|
416
489
|
scroll: {
|
|
417
|
-
y:
|
|
490
|
+
y: 340
|
|
418
491
|
}
|
|
419
492
|
}));
|
|
420
493
|
};
|
|
@@ -23,6 +23,8 @@ var _CatgTable = _interopRequireDefault(require("./CatgTable"));
|
|
|
23
23
|
|
|
24
24
|
var _CustomTable = _interopRequireDefault(require("./CustomTable"));
|
|
25
25
|
|
|
26
|
+
var _BundleCampaign = _interopRequireDefault(require("./BundleCampaign"));
|
|
27
|
+
|
|
26
28
|
var _locale = require("../../locale");
|
|
27
29
|
|
|
28
30
|
require("./index.less");
|
|
@@ -46,7 +48,7 @@ var LinkModal = function LinkModal(props) {
|
|
|
46
48
|
selected = _b[0],
|
|
47
49
|
setSelected = _b[1];
|
|
48
50
|
|
|
49
|
-
var list = ['Category', 'Customized Page', 'Product Details Page', 'Filtered Products', 'Function Page', 'Coupons'];
|
|
51
|
+
var list = ['Category', 'Customized Page', 'Product Details Page', 'Filtered Products', 'Function Page', 'Coupons', 'Bundle Campaign'];
|
|
50
52
|
|
|
51
53
|
var _c = (0, _react.useState)(0),
|
|
52
54
|
total = _c[0],
|
|
@@ -118,6 +120,10 @@ var LinkModal = function LinkModal(props) {
|
|
|
118
120
|
onChange: function onChange(value) {
|
|
119
121
|
return setLinkUrl(value);
|
|
120
122
|
}
|
|
123
|
+
}), selected === 'Bundle Campaign' && /*#__PURE__*/_react["default"].createElement(_BundleCampaign["default"], {
|
|
124
|
+
setUrl: function setUrl(url) {
|
|
125
|
+
return setLinkUrl(url);
|
|
126
|
+
}
|
|
121
127
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
122
128
|
className: "footer"
|
|
123
129
|
}, selected === 'Filtered Products' ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -257,39 +257,47 @@ var ProductModal = function ProductModal(props) {
|
|
|
257
257
|
selLabelData = _j[0],
|
|
258
258
|
setSelLabelData = _j[1];
|
|
259
259
|
|
|
260
|
-
var _k = (0, _react.useState)(
|
|
261
|
-
|
|
262
|
-
|
|
260
|
+
var _k = (0, _react.useState)([]),
|
|
261
|
+
storeList = _k[0],
|
|
262
|
+
setStoreList = _k[1];
|
|
263
263
|
|
|
264
264
|
var _l = (0, _react.useState)(''),
|
|
265
|
-
|
|
266
|
-
|
|
265
|
+
productName = _l[0],
|
|
266
|
+
setProductName = _l[1];
|
|
267
267
|
|
|
268
268
|
var _m = (0, _react.useState)(''),
|
|
269
|
-
|
|
270
|
-
|
|
269
|
+
productCode = _m[0],
|
|
270
|
+
setProductCode = _m[1];
|
|
271
271
|
|
|
272
|
-
var _o = (0, _react.useState)(
|
|
273
|
-
|
|
274
|
-
|
|
272
|
+
var _o = (0, _react.useState)([]),
|
|
273
|
+
storeId = _o[0],
|
|
274
|
+
setStoreId = _o[1];
|
|
275
275
|
|
|
276
|
-
var _p = (0, _react.useState)(
|
|
277
|
-
|
|
278
|
-
|
|
276
|
+
var _p = (0, _react.useState)(''),
|
|
277
|
+
minPrice = _p[0],
|
|
278
|
+
setMinPrice = _p[1];
|
|
279
279
|
|
|
280
|
-
var _q = (0, _react.useState)(
|
|
281
|
-
|
|
282
|
-
|
|
280
|
+
var _q = (0, _react.useState)(''),
|
|
281
|
+
maxPrice = _q[0],
|
|
282
|
+
setMaxPrice = _q[1];
|
|
283
283
|
|
|
284
|
-
var _r = (0, _react.useState)(
|
|
285
|
-
|
|
286
|
-
|
|
284
|
+
var _r = (0, _react.useState)([]),
|
|
285
|
+
promotions = _r[0],
|
|
286
|
+
setPromotions = _r[1];
|
|
287
287
|
|
|
288
|
-
var _s = (0, _react.useState)(
|
|
288
|
+
var _s = (0, _react.useState)([]),
|
|
289
|
+
goodsList = _s[0],
|
|
290
|
+
setGoodsList = _s[1];
|
|
291
|
+
|
|
292
|
+
var _t = (0, _react.useState)(false),
|
|
293
|
+
loading = _t[0],
|
|
294
|
+
setLoading = _t[1];
|
|
295
|
+
|
|
296
|
+
var _u = (0, _react.useState)(defaultList.map(function (v) {
|
|
289
297
|
return v.productId;
|
|
290
298
|
})),
|
|
291
|
-
selectedRowKeys =
|
|
292
|
-
setSelectedRowKeys =
|
|
299
|
+
selectedRowKeys = _u[0],
|
|
300
|
+
setSelectedRowKeys = _u[1];
|
|
293
301
|
|
|
294
302
|
var rowSelection = {
|
|
295
303
|
selectedRowKeys: selectedRowKeys,
|
|
@@ -321,13 +329,13 @@ var ProductModal = function ProductModal(props) {
|
|
|
321
329
|
}
|
|
322
330
|
};
|
|
323
331
|
|
|
324
|
-
var
|
|
332
|
+
var _v = (0, _react.useState)({
|
|
325
333
|
pageSize: 20,
|
|
326
334
|
current: 1,
|
|
327
335
|
total: 0
|
|
328
336
|
}),
|
|
329
|
-
paginationParams =
|
|
330
|
-
setPaginationParams =
|
|
337
|
+
paginationParams = _v[0],
|
|
338
|
+
setPaginationParams = _v[1];
|
|
331
339
|
|
|
332
340
|
var delSelectedItem = function delSelectedItem(index) {
|
|
333
341
|
console.log(selectedRowKeys, index, 2223);
|
|
@@ -432,12 +440,35 @@ var ProductModal = function ProductModal(props) {
|
|
|
432
440
|
}
|
|
433
441
|
});
|
|
434
442
|
});
|
|
443
|
+
}; // 请求店铺列表
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
var queryStore = function queryStore() {
|
|
447
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
448
|
+
var res;
|
|
449
|
+
return __generator(this, function (_a) {
|
|
450
|
+
switch (_a.label) {
|
|
451
|
+
case 0:
|
|
452
|
+
return [4
|
|
453
|
+
/*yield*/
|
|
454
|
+
, (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/stores/list", {}, 'GET')];
|
|
455
|
+
|
|
456
|
+
case 1:
|
|
457
|
+
res = _a.sent();
|
|
458
|
+
setStoreList(res);
|
|
459
|
+
return [2
|
|
460
|
+
/*return*/
|
|
461
|
+
];
|
|
462
|
+
}
|
|
463
|
+
});
|
|
464
|
+
});
|
|
435
465
|
};
|
|
436
466
|
|
|
437
467
|
(0, _react.useEffect)(function () {
|
|
438
468
|
queryOfferCatgs();
|
|
439
469
|
queryBrands();
|
|
440
470
|
queryLabel();
|
|
471
|
+
queryStore();
|
|
441
472
|
}, []);
|
|
442
473
|
(0, _react.useEffect)(function () {
|
|
443
474
|
setSelectedList(defaultList);
|
|
@@ -455,6 +486,7 @@ var ProductModal = function ProductModal(props) {
|
|
|
455
486
|
setSelCatgsList([]);
|
|
456
487
|
setSelLabelData([]);
|
|
457
488
|
setProductName('');
|
|
489
|
+
setStoreId([]);
|
|
458
490
|
setProductCode('');
|
|
459
491
|
setMinPrice('');
|
|
460
492
|
setMaxPrice('');
|
|
@@ -507,17 +539,6 @@ var ProductModal = function ProductModal(props) {
|
|
|
507
539
|
width: 100,
|
|
508
540
|
ellipsis: true
|
|
509
541
|
}];
|
|
510
|
-
|
|
511
|
-
var onResetQryCondition = function onResetQryCondition() {
|
|
512
|
-
setProductName('');
|
|
513
|
-
setPromotions(null);
|
|
514
|
-
setMinPrice('');
|
|
515
|
-
setMaxPrice('');
|
|
516
|
-
setSelBrandsList([]);
|
|
517
|
-
setSelCatgsList([]);
|
|
518
|
-
setSelLabelData([]);
|
|
519
|
-
};
|
|
520
|
-
|
|
521
542
|
return /*#__PURE__*/_react["default"].createElement(_antd.Modal, {
|
|
522
543
|
cancelText: (0, _locale.i18n)('CANCEL'),
|
|
523
544
|
draggable: false,
|
|
@@ -572,6 +593,23 @@ var ProductModal = function ProductModal(props) {
|
|
|
572
593
|
key: item.catgId,
|
|
573
594
|
value: item.brandId
|
|
574
595
|
}, item.brandName);
|
|
596
|
+
}))), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
597
|
+
label: "Store"
|
|
598
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
599
|
+
className: "inputStyle",
|
|
600
|
+
defaultValue: [],
|
|
601
|
+
onChange: function onChange(value) {
|
|
602
|
+
return setStoreId(value);
|
|
603
|
+
},
|
|
604
|
+
optionFilterProp: "children",
|
|
605
|
+
placeholder: "Please select",
|
|
606
|
+
showSearch: true,
|
|
607
|
+
value: storeId
|
|
608
|
+
}, storeList && storeList.length > 0 && storeList.map(function (v) {
|
|
609
|
+
return /*#__PURE__*/_react["default"].createElement(Option, {
|
|
610
|
+
key: v.storeId,
|
|
611
|
+
value: v.storeId
|
|
612
|
+
}, v.storeName);
|
|
575
613
|
}))), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
576
614
|
label: "Lable"
|
|
577
615
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
@@ -661,6 +699,7 @@ var ProductModal = function ProductModal(props) {
|
|
|
661
699
|
queryGoods({
|
|
662
700
|
productName: productName,
|
|
663
701
|
productCode: productCode,
|
|
702
|
+
storeId: storeId,
|
|
664
703
|
cmpTypeId: promotions || '',
|
|
665
704
|
minPrice: minPrice === '' ? '' : minPrice * Math.pow(10, precision),
|
|
666
705
|
maxPrice: maxPrice === '' ? '' : maxPrice * Math.pow(10, precision),
|
|
@@ -240,7 +240,9 @@ function ProductSource(_a) {
|
|
|
240
240
|
type: "primary"
|
|
241
241
|
}, (0, _locale.i18n)('SELECT_PRODUCT')), /*#__PURE__*/_react["default"].createElement("div", {
|
|
242
242
|
className: "total"
|
|
243
|
-
},
|
|
243
|
+
}, (0, _locale.i18n)('TOTAL_PRODUCTS', {
|
|
244
|
+
count: getLength()
|
|
245
|
+
})), visible && /*#__PURE__*/_react["default"].createElement(_ProductModal["default"], {
|
|
244
246
|
closeModal: function closeModal() {
|
|
245
247
|
return setVisbile(false);
|
|
246
248
|
},
|
|
@@ -71,14 +71,14 @@ function (_super) {
|
|
|
71
71
|
return /*#__PURE__*/_react["default"].createElement("img", {
|
|
72
72
|
key: label.imgUrl || label.labelPictureUrl,
|
|
73
73
|
alt: "img",
|
|
74
|
-
className: (0, _classnames["default"])('image-label-wrap', 'img', (_a = {}, _a["position-" + (label.position || '
|
|
74
|
+
className: (0, _classnames["default"])('image-label-wrap', 'img', (_a = {}, _a["position-" + (label.position || 'null')] = true, _a.small = small, _a)),
|
|
75
75
|
src: label.imgUrl || label.labelPictureUrl
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
80
80
|
key: label.labelName,
|
|
81
|
-
className: (0, _classnames["default"])('image-label-wrap', (_b = {}, _b["position-" + (label.position || '
|
|
81
|
+
className: (0, _classnames["default"])('image-label-wrap', (_b = {}, _b["position-" + (label.position || 'null')] = true, _b))
|
|
82
82
|
}, label.labelName);
|
|
83
83
|
});
|
|
84
84
|
};
|
|
@@ -4,14 +4,11 @@
|
|
|
4
4
|
background: #FFFFFF;
|
|
5
5
|
border: 1px solid #D2D9E5;
|
|
6
6
|
width: 142px;
|
|
7
|
-
border-radius: 8px;
|
|
8
7
|
|
|
9
8
|
.img-wrap {
|
|
10
9
|
position: relative;
|
|
11
|
-
border-radius: 8px;
|
|
12
10
|
|
|
13
11
|
.product-img {
|
|
14
|
-
border-radius: 8px;
|
|
15
12
|
width: 140px;
|
|
16
13
|
height: 140px;
|
|
17
14
|
object-fit: cover;
|
|
@@ -36,7 +33,7 @@
|
|
|
36
33
|
}
|
|
37
34
|
|
|
38
35
|
.product-name {
|
|
39
|
-
margin-bottom:
|
|
36
|
+
margin-bottom: 3px;
|
|
40
37
|
// font-family: 'Montserrat';
|
|
41
38
|
// font-style: normal;
|
|
42
39
|
// font-weight: 500;
|
|
@@ -60,7 +57,7 @@
|
|
|
60
57
|
|
|
61
58
|
.old-price-wrap {
|
|
62
59
|
display: flex;
|
|
63
|
-
margin-top:
|
|
60
|
+
margin-top: 0px;
|
|
64
61
|
align-items: baseline;
|
|
65
62
|
white-space: nowrap;
|
|
66
63
|
overflow: hidden;
|
|
@@ -71,9 +68,11 @@
|
|
|
71
68
|
font-family: 'Montserrat';
|
|
72
69
|
font-style: normal;
|
|
73
70
|
font-weight: 700;
|
|
74
|
-
font-size:
|
|
71
|
+
font-size: 8px;
|
|
75
72
|
line-height: 15px;
|
|
76
|
-
color: #
|
|
73
|
+
color: #fff;
|
|
74
|
+
padding: 0 4px;
|
|
75
|
+
background-color: #CE1126;
|
|
77
76
|
}
|
|
78
77
|
|
|
79
78
|
.old-price {
|
|
@@ -279,8 +279,14 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
279
279
|
}
|
|
280
280
|
},
|
|
281
281
|
customize: {
|
|
282
|
-
layout:
|
|
283
|
-
|
|
282
|
+
layout: {
|
|
283
|
+
pcLayout: 'layout1',
|
|
284
|
+
h5Layout: 'layout1'
|
|
285
|
+
},
|
|
286
|
+
align: 'left',
|
|
287
|
+
pcRowNum: 6,
|
|
288
|
+
pcMaxRowNum: 6,
|
|
289
|
+
pcMinRowNum: 5
|
|
284
290
|
},
|
|
285
291
|
background: {
|
|
286
292
|
opacity: 100,
|
|
@@ -9,6 +9,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _mobile = _interopRequireDefault(require("./mobile"));
|
|
11
11
|
|
|
12
|
+
var _pc = _interopRequireDefault(require("./pc"));
|
|
13
|
+
|
|
12
14
|
var _defaultJSON = require("./defaultJSON");
|
|
13
15
|
|
|
14
16
|
var _coreUtil = require("../../../../utils/coreUtil");
|
|
@@ -75,7 +77,9 @@ function (_super) {
|
|
|
75
77
|
var wrapStyle = (0, _businessUtil.computeStyle)(nodeData, window.magicDesign.device);
|
|
76
78
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
77
79
|
style: wrapStyle
|
|
78
|
-
}, (0, _coreUtil.isPc)() ?
|
|
80
|
+
}, (0, _coreUtil.isPc)() ? /*#__PURE__*/_react["default"].createElement(_pc["default"], {
|
|
81
|
+
panelProps: nodeData
|
|
82
|
+
}) : /*#__PURE__*/_react["default"].createElement(_mobile["default"], {
|
|
79
83
|
panelProps: nodeData
|
|
80
84
|
}));
|
|
81
85
|
};
|
|
@@ -227,10 +227,6 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
|
|
227
227
|
};
|
|
228
228
|
|
|
229
229
|
var LAYOUT_IMAGE_SIZE = {
|
|
230
|
-
left: {
|
|
231
|
-
w: '100%',
|
|
232
|
-
h: 165
|
|
233
|
-
},
|
|
234
230
|
layout1: {
|
|
235
231
|
w: '100%',
|
|
236
232
|
h: 164
|
|
@@ -416,10 +412,8 @@ function (_super) {
|
|
|
416
412
|
};
|
|
417
413
|
|
|
418
414
|
_this.resetLayout = function () {
|
|
419
|
-
var layout = _this.props.panelProps.customize.layout.h5Layout
|
|
420
|
-
|
|
415
|
+
var layout = _this.props.panelProps.customize.layout.h5Layout;
|
|
421
416
|
var LAYOUT_COLUMN = {
|
|
422
|
-
left: 2,
|
|
423
417
|
layout1: 2,
|
|
424
418
|
layout2: 1,
|
|
425
419
|
layout3: 3
|
|
@@ -543,7 +537,7 @@ function (_super) {
|
|
|
543
537
|
hideTabs: hideTabs
|
|
544
538
|
});
|
|
545
539
|
});
|
|
546
|
-
var curLayout = panelProps.customize.layout.h5Layout
|
|
540
|
+
var curLayout = panelProps.customize.layout.h5Layout;
|
|
547
541
|
|
|
548
542
|
if (curLayout !== this.preLayout) {
|
|
549
543
|
this.resetLayout();
|
|
@@ -565,8 +559,11 @@ function (_super) {
|
|
|
565
559
|
var bgStyle = this.getBackgroundStyle();
|
|
566
560
|
var products = this.state["products" + tabIndex] || [];
|
|
567
561
|
var isDivide = groupSource.length <= 3;
|
|
568
|
-
var layout = panelProps.customize.layout.h5Layout
|
|
569
|
-
|
|
562
|
+
var layout = panelProps.customize.layout.h5Layout;
|
|
563
|
+
|
|
564
|
+
var _seeAll = (0, _commonUtil.ensure)(function () {
|
|
565
|
+
return groupSource[tabIndex].seeAll;
|
|
566
|
+
}, '');
|
|
570
567
|
|
|
571
568
|
var imgHeight = (0, _commonUtil.ensure)(function () {
|
|
572
569
|
return LAYOUT_IMAGE_SIZE[layout].h;
|
|
@@ -614,7 +611,27 @@ function (_super) {
|
|
|
614
611
|
transform: "translateX(" + tabLeft + "px)",
|
|
615
612
|
background: this.getTabBarActiveColor(panelProps)
|
|
616
613
|
}
|
|
617
|
-
})), ['
|
|
614
|
+
})), ['layout1', 'layout2', 'layout3'].includes(layout) ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
615
|
+
key: "macyContainer",
|
|
616
|
+
className: "macyContainer"
|
|
617
|
+
}, products.map(function (item) {
|
|
618
|
+
return /*#__PURE__*/_react["default"].createElement(_ProductItem["default"], {
|
|
619
|
+
key: item.productId,
|
|
620
|
+
data: item,
|
|
621
|
+
fixHeight: layout === 'layout3',
|
|
622
|
+
imgHeight: imgHeight,
|
|
623
|
+
imgWidth: imgWidth,
|
|
624
|
+
layout: layout === 'layout2' ? 'horizontal' : 'vertical',
|
|
625
|
+
onItemClick: function onItemClick() {
|
|
626
|
+
return (0, _coreUtil.clickUrl)("/product/detail/" + item.offerId + "?productId=" + (item.sppProductId || item.productId || ''));
|
|
627
|
+
},
|
|
628
|
+
panelProps: panelProps.content,
|
|
629
|
+
showProgress: false
|
|
630
|
+
});
|
|
631
|
+
})), _seeAll.open && products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
632
|
+
className: "btnSeeAll",
|
|
633
|
+
data: _seeAll
|
|
634
|
+
})) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
618
635
|
key: "scrollContainer",
|
|
619
636
|
className: (0, _classnames["default"])('scrollContainer', {
|
|
620
637
|
pl_100: layout === 'layout5'
|
|
@@ -634,24 +651,10 @@ function (_super) {
|
|
|
634
651
|
panelProps: panelProps.content,
|
|
635
652
|
showProgress: false
|
|
636
653
|
}));
|
|
637
|
-
})
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
}
|
|
641
|
-
return /*#__PURE__*/_react["default"].createElement(_ProductItem["default"], {
|
|
642
|
-
key: item.productId,
|
|
643
|
-
data: item,
|
|
644
|
-
fixHeight: layout === 'layout3',
|
|
645
|
-
imgHeight: imgHeight,
|
|
646
|
-
imgWidth: imgWidth,
|
|
647
|
-
layout: layout === 'layout2' ? 'horizontal' : 'vertical',
|
|
648
|
-
onItemClick: function onItemClick() {
|
|
649
|
-
return (0, _coreUtil.clickUrl)("/product/detail/" + item.offerId + "?productId=" + (item.sppProductId || item.productId || ''));
|
|
650
|
-
},
|
|
651
|
-
panelProps: panelProps.content,
|
|
652
|
-
showProgress: false
|
|
653
|
-
});
|
|
654
|
-
}))));
|
|
654
|
+
}), _seeAll.open && products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
655
|
+
className: "btnSeeAll",
|
|
656
|
+
data: _seeAll
|
|
657
|
+
})));
|
|
655
658
|
};
|
|
656
659
|
|
|
657
660
|
RecommendMobile.defaultProps = {
|