@fonixtree/magic-design 0.1.81 → 0.1.82

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.
Files changed (67) hide show
  1. package/es/assets/less/button.less +5 -0
  2. package/es/common/AffiliateProductModal/index.js +1 -1
  3. package/es/common/AffiliateProductModal/index.less +1 -1
  4. package/es/common/Button/index.less +0 -1
  5. package/es/common/LinkModal/BundleCampaign/index.js +2 -2
  6. package/es/common/LinkModal/CouponTable/index.js +1 -1
  7. package/es/common/LinkModal/FilteredProductModal/index.js +82 -106
  8. package/es/common/LinkModal/FilteredProductModal/index.less +1 -0
  9. package/es/common/LinkModal/ProductDetailPage/index.js +115 -60
  10. package/es/common/LinkModal/ProductDetailPage/index.less +6 -1
  11. package/es/common/ProductModal/index.js +144 -100
  12. package/es/common/ProductModal/index.less +7 -1
  13. package/es/common/ProductSource/index.js +81 -21
  14. package/es/composite-comp/bol/components/Wallet/mobile/index.js +1 -1
  15. package/es/composite-comp/bol/components/Wallet/mobile/index.less +1 -1
  16. package/es/composite-comp/bol/components/Wallet/pc/index.js +0 -2
  17. package/es/composite-comp/bol/components/Wallet/pc/index.less +1 -40
  18. package/es/composite-comp/bol/second-config-panels/WalletSecondConfig/index.js +1 -1
  19. package/es/composite-comp/dito/components/HeadNavigation/defaultJSON.js +22 -17
  20. package/es/composite-comp/dito/components/HeadNavigation/mobile/index.js +2 -2
  21. package/es/composite-comp/dito/components/Recommend/mobile/index.js +27 -24
  22. package/es/composite-comp/dito/components/Recommend/pc/index.js +1 -1
  23. package/es/composite-comp/dito/config-panels/HeadNavigationConfig/index.js +25 -27
  24. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +4 -2
  25. package/es/constants/index.js +13 -4
  26. package/es/core/Designer/PageCompList/index.js +1 -1
  27. package/es/core/Designer/QuickMenuBar/index.js +6 -2
  28. package/es/core/Designer/index.js +11 -1
  29. package/es/locale/en/en.json +2 -1
  30. package/es/locale/es/es.json +2 -1
  31. package/es/locale/id/id.json +2 -1
  32. package/es/utils/businessUtil.js +2 -2
  33. package/es/utils/commonUtil.js +14 -6
  34. package/lib/assets/less/button.less +5 -0
  35. package/lib/common/AffiliateProductModal/index.js +1 -1
  36. package/lib/common/AffiliateProductModal/index.less +1 -1
  37. package/lib/common/Button/index.less +0 -1
  38. package/lib/common/LinkModal/BundleCampaign/index.js +2 -2
  39. package/lib/common/LinkModal/CouponTable/index.js +1 -1
  40. package/lib/common/LinkModal/FilteredProductModal/index.js +82 -106
  41. package/lib/common/LinkModal/FilteredProductModal/index.less +1 -0
  42. package/lib/common/LinkModal/ProductDetailPage/index.js +115 -60
  43. package/lib/common/LinkModal/ProductDetailPage/index.less +6 -1
  44. package/lib/common/ProductModal/index.js +144 -100
  45. package/lib/common/ProductModal/index.less +7 -1
  46. package/lib/common/ProductSource/index.js +81 -21
  47. package/lib/composite-comp/bol/components/Wallet/mobile/index.js +1 -1
  48. package/lib/composite-comp/bol/components/Wallet/mobile/index.less +1 -1
  49. package/lib/composite-comp/bol/components/Wallet/pc/index.js +0 -2
  50. package/lib/composite-comp/bol/components/Wallet/pc/index.less +1 -40
  51. package/lib/composite-comp/bol/second-config-panels/WalletSecondConfig/index.js +1 -1
  52. package/lib/composite-comp/dito/components/HeadNavigation/defaultJSON.js +22 -17
  53. package/lib/composite-comp/dito/components/HeadNavigation/mobile/index.js +2 -2
  54. package/lib/composite-comp/dito/components/Recommend/mobile/index.js +27 -24
  55. package/lib/composite-comp/dito/components/Recommend/pc/index.js +1 -1
  56. package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/index.js +25 -27
  57. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +4 -2
  58. package/lib/constants/index.js +13 -4
  59. package/lib/core/Designer/PageCompList/index.js +1 -1
  60. package/lib/core/Designer/QuickMenuBar/index.js +6 -2
  61. package/lib/core/Designer/index.js +11 -1
  62. package/lib/locale/en/en.json +2 -1
  63. package/lib/locale/es/es.json +2 -1
  64. package/lib/locale/id/id.json +2 -1
  65. package/lib/utils/businessUtil.js +2 -2
  66. package/lib/utils/commonUtil.js +14 -6
  67. package/package.json +1 -1
@@ -68,23 +68,28 @@ var getDefaultJSON = function getDefaultJSON() {
68
68
  groupSource: defaultHeadName.map(function (group) {
69
69
  return groupSourceHeadJSON(group);
70
70
  }),
71
- displayPage: [{
72
- name: 'Store Home',
73
- type: '/store-home',
74
- state: true
75
- }, {
76
- name: 'Product Detail',
77
- type: '/product/list',
78
- state: true
79
- }, {
80
- name: 'Poster Page',
81
- type: '/poster',
82
- state: true
83
- }, {
84
- name: 'Community',
85
- type: '/main/community',
86
- state: true
87
- }],
71
+ // displayPage: [
72
+ // {
73
+ // name: 'Store Home',
74
+ // type: '/store-home',
75
+ // state: true,
76
+ // },
77
+ // {
78
+ // name: 'Product Detail',
79
+ // type: '/product/list',
80
+ // state: true,
81
+ // },
82
+ // {
83
+ // name: 'Poster Page',
84
+ // type: '/poster',
85
+ // state: true,
86
+ // },
87
+ // {
88
+ // name: 'Community',
89
+ // type: '/main/community',
90
+ // state: true,
91
+ // },
92
+ // ],
88
93
  background: {
89
94
  opacity: 100,
90
95
  color: '#fff',
@@ -62,8 +62,8 @@ function (_super) {
62
62
  var _this = this;
63
63
 
64
64
  var data = this.props.data;
65
- var showNav = this.state.showNav;
66
- console.log('---head data', data);
65
+ var showNav = this.state.showNav; // console.log('---head data', data);
66
+
67
67
  var GAData = (0, _commonUtil.getGAData)(data);
68
68
  return /*#__PURE__*/_react["default"].createElement("div", {
69
69
  className: "m-head-navigation"
@@ -308,14 +308,14 @@ function (_super) {
308
308
 
309
309
  _this.getProductList = function (index) {
310
310
  return __awaiter(_this, void 0, void 0, function () {
311
- var panelProps, groupSource, recommendId, pageId, cache, _a, _b, sourceType, _c, prodIds, _d, intelligentType, _e, intelligentValue, _f, maxProdNum, newData, res, res, e_1, _cache;
311
+ var panelProps, groupSource, recommendId, pageId, cache, _a, _b, sourceType, _c, prodIds, _d, prodType, _e, intelligentType, _f, intelligentValue, _g, maxProdNum, newData, params, res, res, e_1, _cache;
312
312
 
313
- var _g, _h, _j;
313
+ var _h, _j, _k;
314
314
 
315
315
  var _this = this;
316
316
 
317
- return __generator(this, function (_k) {
318
- switch (_k.label) {
317
+ return __generator(this, function (_l) {
318
+ switch (_l.label) {
319
319
  case 0:
320
320
  panelProps = this.props.panelProps;
321
321
  groupSource = this.state.groupSource;
@@ -327,7 +327,7 @@ function (_super) {
327
327
 
328
328
  if (cache) {
329
329
  if ("products" + index in cache) {
330
- this.setState((_g = {}, _g["products" + index] = cache["products" + index], _g), function () {
330
+ this.setState((_h = {}, _h["products" + index] = cache["products" + index], _h), function () {
331
331
  _this.resetLayout();
332
332
  });
333
333
  /** 如果数据未过期 */
@@ -339,12 +339,12 @@ function (_super) {
339
339
  }
340
340
  }
341
341
 
342
- _a = groupSource[index] || {}, _b = _a.sourceType, sourceType = _b === void 0 ? '' : _b, _c = _a.prodIds, prodIds = _c === void 0 ? '' : _c, _d = _a.intelligentType, intelligentType = _d === void 0 ? '' : _d, _e = _a.intelligentValue, intelligentValue = _e === void 0 ? [] : _e, _f = _a.maxProdNum, maxProdNum = _f === void 0 ? 10 : _f;
342
+ _a = groupSource[index] || {}, _b = _a.sourceType, sourceType = _b === void 0 ? '' : _b, _c = _a.prodIds, prodIds = _c === void 0 ? '' : _c, _d = _a.prodType, prodType = _d === void 0 ? '' : _d, _e = _a.intelligentType, intelligentType = _e === void 0 ? '' : _e, _f = _a.intelligentValue, intelligentValue = _f === void 0 ? [] : _f, _g = _a.maxProdNum, maxProdNum = _g === void 0 ? 10 : _g;
343
343
  newData = [];
344
- _k.label = 1;
344
+ _l.label = 1;
345
345
 
346
346
  case 1:
347
- _k.trys.push([1, 9,, 10]);
347
+ _l.trys.push([1, 9,, 10]);
348
348
 
349
349
  if (!(groupSource.length > 0)) return [3
350
350
  /*break*/
@@ -352,22 +352,25 @@ function (_super) {
352
352
  if (!(sourceType === 'select')) return [3
353
353
  /*break*/
354
354
  , 3];
355
+ if (!prodIds) return [2
356
+ /*return*/
357
+ ];
358
+ params = {
359
+ state: 'A'
360
+ };
355
361
 
356
- if (!prodIds) {
357
- return [2
358
- /*return*/
359
- ];
362
+ if (prodType === 'spu') {
363
+ params.offers = prodIds;
364
+ } else {
365
+ params.products = prodIds;
360
366
  }
361
367
 
362
368
  return [4
363
369
  /*yield*/
364
- , (0, _commonUtil.commonFetch)('/designer/v1/h5/products', {
365
- products: prodIds,
366
- state: 'A'
367
- }, 'GET')];
370
+ , (0, _commonUtil.commonFetch)('/designer/v1/h5/products', params, 'GET')];
368
371
 
369
372
  case 2:
370
- res = _k.sent();
373
+ res = _l.sent();
371
374
  newData = __spreadArrays(res.list);
372
375
  return [3
373
376
  /*break*/
@@ -386,11 +389,11 @@ function (_super) {
386
389
  intelligentType: intelligentType,
387
390
  intelligentValue: intelligentValue.join(','),
388
391
  aggregation: false,
389
- storeId: window.magicDesign.storeId || ''
392
+ storeId: window.magicDesign.storeId >= 0 ? window.magicDesign.storeId : ''
390
393
  }, 'POST')];
391
394
 
392
395
  case 4:
393
- res = _k.sent();
396
+ res = _l.sent();
394
397
  newData = __spreadArrays(res.pageInfo.list);
395
398
  return [3
396
399
  /*break*/
@@ -398,7 +401,7 @@ function (_super) {
398
401
 
399
402
  case 5:
400
403
  newData = [];
401
- _k.label = 6;
404
+ _l.label = 6;
402
405
 
403
406
  case 6:
404
407
  return [3
@@ -407,7 +410,7 @@ function (_super) {
407
410
 
408
411
  case 7:
409
412
  newData = [];
410
- _k.label = 8;
413
+ _l.label = 8;
411
414
 
412
415
  case 8:
413
416
  return [3
@@ -415,7 +418,7 @@ function (_super) {
415
418
  , 10];
416
419
 
417
420
  case 9:
418
- e_1 = _k.sent();
421
+ e_1 = _l.sent();
419
422
  newData = [];
420
423
  return [3
421
424
  /*break*/
@@ -424,10 +427,10 @@ function (_super) {
424
427
  case 10:
425
428
  if (!(0, _coreUtil.isDesignMode)()) {
426
429
  _cache = (0, _storeUtil.getMagicStore)("recommend_" + pageId + "_" + recommendId);
427
- (0, _storeUtil.setMagicStore)("recommend_" + pageId + "_" + recommendId, __assign(__assign({}, _cache), (_h = {}, _h["products" + index] = newData, _h.endTime = Date.now() + 3 * 60 * 1000, _h)));
430
+ (0, _storeUtil.setMagicStore)("recommend_" + pageId + "_" + recommendId, __assign(__assign({}, _cache), (_j = {}, _j["products" + index] = newData, _j.endTime = Date.now() + 3 * 60 * 1000, _j)));
428
431
  }
429
432
 
430
- this.setState((_j = {}, _j["products" + index] = newData, _j), function () {
433
+ this.setState((_k = {}, _k["products" + index] = newData, _k), function () {
431
434
  _this.resetLayout();
432
435
  });
433
436
  return [2
@@ -381,7 +381,7 @@ function (_super) {
381
381
  intelligentType: intelligentType,
382
382
  intelligentValue: intelligentValue.join(','),
383
383
  aggregation: false,
384
- storeId: window.magicDesign.storeId || ''
384
+ storeId: window.magicDesign.storeId >= 0 ? window.magicDesign.storeId : ''
385
385
  }, 'POST')];
386
386
 
387
387
  case 4:
@@ -7,8 +7,6 @@ exports["default"] = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
10
- var _antd = require("antd");
11
-
12
10
  var _HeadNavConfigImageGroup = _interopRequireDefault(require("./HeadNavConfigImageGroup"));
13
11
 
14
12
  var _Collapse = _interopRequireDefault(require("../../../../common/Collapse"));
@@ -19,8 +17,6 @@ var _locale = require("../../../../locale");
19
17
 
20
18
  var _coreUtil = require("../../../../utils/coreUtil");
21
19
 
22
- var _common = require("../../../../common");
23
-
24
20
  require("./index.less");
25
21
 
26
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -65,25 +61,30 @@ function (_super) {
65
61
  _this.setState({});
66
62
  };
67
63
 
68
- _this.getDisplayPage = function () {
69
- var data = _this.props.data;
70
- return /*#__PURE__*/_react["default"].createElement(_common.Field, null, data.displayPage.map(function (one) {
71
- return /*#__PURE__*/_react["default"].createElement("div", {
72
- key: one.name,
73
- className: "head-navigation-display-wrap"
74
- }, /*#__PURE__*/_react["default"].createElement(_antd.Checkbox, {
75
- checked: one.state,
76
- onChange: function onChange(e) {
77
- one.state = e.target.checked;
78
-
79
- _this.selfRender();
80
- }
81
- }, one.name));
82
- }));
83
- };
84
-
85
64
  return _this;
86
- }
65
+ } // getDisplayPage = () => {
66
+ // const { data } = this.props;
67
+ // return (
68
+ // <Field>
69
+ // {
70
+ // data.displayPage.map(one => (
71
+ // <div key={one.name} className="head-navigation-display-wrap">
72
+ // <Checkbox
73
+ // checked={one.state}
74
+ // onChange={e => {
75
+ // one.state = e.target.checked;
76
+ // this.selfRender();
77
+ // }}
78
+ // >
79
+ // {one.name}
80
+ // </Checkbox>
81
+ // </div>
82
+ // ))
83
+ // }
84
+ // </Field>
85
+ // );
86
+ // }
87
+
87
88
 
88
89
  HeadNavConfigImageGroup.prototype.render = function () {
89
90
  var data = this.props.data;
@@ -98,11 +99,8 @@ function (_super) {
98
99
  value: /*#__PURE__*/_react["default"].createElement(_HeadNavConfigImageGroup["default"], {
99
100
  source: data.groupSource
100
101
  })
101
- }, {
102
- key: 'headNavigation3',
103
- name: (0, _locale.i18n)('DISPLAY_PAGE'),
104
- value: this.getDisplayPage()
105
- }, {
102
+ }, // { key: 'headNavigation3', name: i18n('DISPLAY_PAGE'), value: this.getDisplayPage() },
103
+ {
106
104
  key: 'headNavigation2',
107
105
  name: (0, _locale.i18n)('BACKGROUND'),
108
106
  value: /*#__PURE__*/_react["default"].createElement(_BackgroundConfig["default"], {
@@ -114,11 +114,13 @@ function (_super) {
114
114
  }, (0, _locale.i18n)('AI_RECOMMENDATION')))), /*#__PURE__*/_react["default"].createElement("div", {
115
115
  className: "greyBg"
116
116
  }, panelProps.sourceType === 'select' && /*#__PURE__*/_react["default"].createElement(_common.ProductSource, {
117
- onChange: function onChange(v) {
118
- panelProps.prodIds = v;
117
+ onChange: function onChange(ids, type) {
118
+ panelProps.prodIds = ids;
119
+ panelProps.prodType = type;
119
120
 
120
121
  _this.selfRender();
121
122
  },
123
+ prodType: panelProps.prodType,
122
124
  value: panelProps.prodIds
123
125
  }), panelProps.sourceType === 'recommend' && /*#__PURE__*/_react["default"].createElement(_AIRecommendation["default"], {
124
126
  onChange: function onChange(val) {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.walletType = exports.urlTypeMap = exports.urlType = exports.respCodeMap = exports.quickMenuCode = exports.partyTypeMap = exports.metaType = exports.metaInst = exports.metaInsType = exports.magicMode = exports.eventType = exports.deviceTypeWidthMap = exports.deviceTypeMap = exports.compInfoMap = exports.STORAGE_KEY = exports.CREDIT_STATE = void 0;
6
+ exports.walletType = exports.urlTypeMap = exports.urlType = exports.tempTypeMap = exports.respCodeMap = exports.quickMenuCode = exports.partyTypeMap = exports.metaType = exports.metaInst = exports.metaInsType = exports.magicMode = exports.eventType = exports.deviceTypeWidthMap = exports.deviceTypeMap = exports.compInfoMap = exports.STORAGE_KEY = exports.CREDIT_STATE = void 0;
7
7
  var STORAGE_KEY = {
8
8
  LOCALE: 'magicLocale',
9
9
  MAGIC_RENDER_HTML: 'MAGIC_RENDER_HTML',
@@ -42,7 +42,7 @@ var walletType = {
42
42
  BNPL: 'BNPL',
43
43
  B2B: 'B2B PayLater',
44
44
  BALANCE: 'Balance',
45
- CENDUIT: 'Cenduit'
45
+ CENDUIT: 'CenDuit'
46
46
  };
47
47
  exports.walletType = walletType;
48
48
  var urlType = {
@@ -99,7 +99,9 @@ var quickMenuCode = {
99
99
  PUBLISH: 'PUBLISH',
100
100
  PUBLISH_LATER: 'PUBLISH_LATER',
101
101
  MODE_PC: 'MODE_PC',
102
- MODE_PHONE: 'MODE_PHONE'
102
+ MODE_PHONE: 'MODE_PHONE',
103
+ PUSH: 'PUSH',
104
+ SET_AS_TEMPLATE: 'SET_AS_TEMPLATE'
103
105
  };
104
106
  exports.quickMenuCode = quickMenuCode;
105
107
  var compInfoMap = {
@@ -263,4 +265,11 @@ var partyTypeMap = {
263
265
  'operation/v1': 'P',
264
266
  'trade/v1': 'S'
265
267
  };
266
- exports.partyTypeMap = partyTypeMap;
268
+ /** 模版类型 */
269
+
270
+ exports.partyTypeMap = partyTypeMap;
271
+ var tempTypeMap = {
272
+ PAGE: 'Page',
273
+ TEMPLATE: 'TemplateLibrary'
274
+ };
275
+ exports.tempTypeMap = tempTypeMap;
@@ -293,7 +293,7 @@ function PageCompList(_a) {
293
293
  type: "icon-drag"
294
294
  }), /*#__PURE__*/_react["default"].createElement("span", {
295
295
  className: "card-title ml16"
296
- }, index + 1, ". ", (_b = _constants.compInfoMap[comp.type]) === null || _b === void 0 ? void 0 : _b.name)), /*#__PURE__*/_react["default"].createElement(_antd.Dropdown, {
296
+ }, index + 1, ". ", (_b = _constants.compInfoMap[comp.type]) === null || _b === void 0 ? void 0 : _b.name)), pageType !== 'Menu' && /*#__PURE__*/_react["default"].createElement(_antd.Dropdown, {
297
297
  overlay: menu,
298
298
  placement: "bottomRight",
299
299
  trigger: ['click']
@@ -183,7 +183,11 @@ function (_super) {
183
183
  type: "light"
184
184
  }, (0, _locale.i18n)('SAVE'))) : /*#__PURE__*/_react["default"].createElement("div", {
185
185
  className: "menu_right"
186
- }, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
186
+ }, window.magicDesign.templateType === _constants.tempTypeMap.PAGE && /*#__PURE__*/_react["default"].createElement(_Button["default"], {
187
+ "data-code": _constants.quickMenuCode.SET_AS_TEMPLATE,
188
+ onClick: this.onBtnClick,
189
+ type: "text"
190
+ }, (0, _locale.i18n)('SET_AS_TEMPLATE')), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
187
191
  "data-code": _constants.quickMenuCode.PREVIEW,
188
192
  onClick: this.onBtnClick
189
193
  }, (0, _locale.i18n)('PREVIEW')), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
@@ -200,7 +204,7 @@ function (_super) {
200
204
  onClick: this.onBtnClick,
201
205
  tip: "The page is in use. Please copy or create a new page",
202
206
  type: "primary"
203
- }, (0, _locale.i18n)('PUBLISH_NOW'), /*#__PURE__*/_react["default"].createElement(_antd.Dropdown, {
207
+ }, (0, _locale.i18n)('PUBLISH_NOW'), window.magicDesign.templateType === 'Page' && /*#__PURE__*/_react["default"].createElement(_antd.Dropdown, {
204
208
  getPopupContainer: function getPopupContainer() {
205
209
  return document.querySelector('.publish_wrap');
206
210
  },
@@ -467,7 +467,9 @@ function (_super) {
467
467
  var _a = _this.props,
468
468
  onPublish = _a.onPublish,
469
469
  onSave = _a.onSave,
470
- onPreviews = _a.onPreviews;
470
+ onPreviews = _a.onPreviews,
471
+ onPush = _a.onPush,
472
+ onSetAsTemp = _a.onSetAsTemp;
471
473
  var _b = _this.state,
472
474
  device = _b.device,
473
475
  MPageData = _b.MPageData;
@@ -502,6 +504,14 @@ function (_super) {
502
504
 
503
505
  break;
504
506
 
507
+ case _constants.quickMenuCode.PUSH:
508
+ onPush(handleParams);
509
+ break;
510
+
511
+ case _constants.quickMenuCode.SET_AS_TEMPLATE:
512
+ onSetAsTemp(handleParams);
513
+ break;
514
+
505
515
  case _constants.quickMenuCode.PUBLISH:
506
516
  onPublish(handleParams);
507
517
  break;
@@ -98,7 +98,8 @@
98
98
  "BANNER_HEIGHT": "Banner Height",
99
99
  "IMAGE": "Image",
100
100
  "PRODUCT_NAME": "Product Name",
101
- "PRODUCT_CODE": "Product Code",
101
+ "SKU_CODE": "SKU Code",
102
+ "SPU_CODE": "SPU Code",
102
103
  "SKU": "SKU",
103
104
  "PRICE": "Price",
104
105
  "BRAND": "Brand",
@@ -98,7 +98,8 @@
98
98
  "BANNER_HEIGHT": "Altura del banner",
99
99
  "IMAGE": "Imagen",
100
100
  "PRODUCT_NAME": "Nombre del producto",
101
- "PRODUCT_CODE": "Código de producto",
101
+ "SKU_CODE": "Código SKU",
102
+ "SPU_CODE": "Código spu",
102
103
  "SKU": "SKU",
103
104
  "PRICE": "Precio",
104
105
  "BRAND": "Marca",
@@ -98,7 +98,8 @@
98
98
  "BANNER_HEIGHT": "Banner Height",
99
99
  "IMAGE": "Image",
100
100
  "PRODUCT_NAME": "Product Name",
101
- "PRODUCT_CODE": "Product Code",
101
+ "SKU_CODE": "SKU Code",
102
+ "SPU_CODE": "SPU Code",
102
103
  "SKU": "SKU",
103
104
  "PRICE": "Price",
104
105
  "BRAND": "Brand",
@@ -98,7 +98,7 @@ var newParseUrl = function newParseUrl(urlObj) {
98
98
  // 商品列表
99
99
 
100
100
  case _constants.urlTypeMap.FILTERED_PRODUCT:
101
- link = "/product/list?" + value;
101
+ link = "/product/list/?" + value;
102
102
  params = {
103
103
  action: 'jump',
104
104
  params: {
@@ -272,7 +272,7 @@ var parseUrl = function parseUrl(url) {
272
272
  // 商品列表
273
273
 
274
274
  case _constants.urlType.PROD_FILTER:
275
- link = "/product/list?" + arg1;
275
+ link = "/product/list/?" + arg1;
276
276
  params = {
277
277
  action: 'jump',
278
278
  params: {
@@ -291,14 +291,22 @@ var navigateTo = function navigateTo(url) {
291
291
  return;
292
292
  }
293
293
 
294
- if (url.startsWith('/')) {
295
- if (window.magicDesign.history && !window.magicDesign.navigatePreUrl) {
296
- window.magicDesign.history.push(url);
297
- } else {
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
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "0.1.81",
4
+ "version": "0.1.82",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",