@fonixtree/magic-design 2.0.28 → 2.0.30

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 (47) hide show
  1. package/es/common/Field/index.js +20 -3
  2. package/es/common/LinkModal/CatgTable/index.js +1 -1
  3. package/es/common/LinkModal/FilteredProductModal/index.js +2 -2
  4. package/es/common/LinkModal/ProductDetailPage/index.js +1 -1
  5. package/es/composite-comp/bol/components/Carousel/index.js +34 -3
  6. package/es/composite-comp/bol/components/Carousel/mobile/index.js +4 -2
  7. package/es/composite-comp/bol/components/Carousel/pc/index.js +4 -2
  8. package/es/composite-comp/bol/components/Location/defaultJSON.js +22 -16
  9. package/es/composite-comp/bol/components/Location/index.js +20 -58
  10. package/es/composite-comp/bol/components/Location/index.less +15 -0
  11. package/es/composite-comp/bol/config-panels/LocationConfig/index.js +50 -23
  12. package/es/composite-comp/dito/components/SignBoard/mobile/index.js +16 -12
  13. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +1 -1
  14. package/es/constants/component-types.js +6 -2
  15. package/es/constants/index.js +4 -0
  16. package/es/constants/layout.js +9 -1
  17. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +1 -1
  18. package/es/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +1 -1
  19. package/es/locale/en/en.json +2 -0
  20. package/es/locale/es/es.json +2 -0
  21. package/es/locale/id/id.json +2 -0
  22. package/es/meta-comp/components/Image/index.js +18 -3
  23. package/lib/common/Field/index.js +20 -3
  24. package/lib/common/LinkModal/CatgTable/index.js +1 -1
  25. package/lib/common/LinkModal/FilteredProductModal/index.js +2 -2
  26. package/lib/common/LinkModal/ProductDetailPage/index.js +1 -1
  27. package/lib/composite-comp/bol/components/Carousel/index.js +34 -3
  28. package/lib/composite-comp/bol/components/Carousel/mobile/index.js +4 -2
  29. package/lib/composite-comp/bol/components/Carousel/pc/index.js +4 -2
  30. package/lib/composite-comp/bol/components/Location/defaultJSON.js +22 -16
  31. package/lib/composite-comp/bol/components/Location/index.js +20 -58
  32. package/lib/composite-comp/bol/components/Location/index.less +15 -0
  33. package/lib/composite-comp/bol/config-panels/LocationConfig/index.js +50 -23
  34. package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +16 -12
  35. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +1 -1
  36. package/lib/constants/component-types.js +6 -2
  37. package/lib/constants/index.js +4 -0
  38. package/lib/constants/layout.js +9 -1
  39. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +1 -1
  40. package/lib/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +1 -1
  41. package/lib/locale/en/en.json +2 -0
  42. package/lib/locale/es/es.json +2 -0
  43. package/lib/locale/id/id.json +2 -0
  44. package/lib/meta-comp/components/Image/index.js +18 -3
  45. package/package.json +1 -1
  46. package/es/composite-comp/bol/config-panels/LocationConfig/MyEditor/index.js +0 -42
  47. package/lib/composite-comp/bol/config-panels/LocationConfig/MyEditor/index.js +0 -42
@@ -13,6 +13,8 @@ require("./index.less");
13
13
 
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
15
 
16
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
17
+
16
18
  var __extends = void 0 && (void 0).__extends || function () {
17
19
  var _extendStatics = function extendStatics(d, b) {
18
20
  _extendStatics = Object.setPrototypeOf || {
@@ -39,6 +41,19 @@ var __extends = void 0 && (void 0).__extends || function () {
39
41
  };
40
42
  }();
41
43
 
44
+ var __rest = void 0 && (void 0).__rest || function (s, e) {
45
+ var t = {};
46
+
47
+ for (var p in s) {
48
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
49
+ }
50
+
51
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
52
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
53
+ }
54
+ return t;
55
+ };
56
+
42
57
  var Field =
43
58
  /** @class */
44
59
  function (_super) {
@@ -53,13 +68,15 @@ function (_super) {
53
68
  title = _a.title,
54
69
  children = _a.children,
55
70
  layout = _a.layout,
56
- split = _a.split;
57
- return /*#__PURE__*/_react["default"].createElement("div", {
71
+ split = _a.split,
72
+ rest = __rest(_a, ["title", "children", "layout", "split"]);
73
+
74
+ return /*#__PURE__*/_react["default"].createElement("div", _extends({
58
75
  className: (0, _classnames["default"])('m-field', {
59
76
  split: split,
60
77
  bold: split === 'bold'
61
78
  })
62
- }, /*#__PURE__*/_react["default"].createElement("div", {
79
+ }, rest), /*#__PURE__*/_react["default"].createElement("div", {
63
80
  className: (0, _classnames["default"])('field-item', {
64
81
  horizontal: layout === 'horizontal'
65
82
  })
@@ -184,7 +184,7 @@ function CatgTable(props) {
184
184
  setLoading(true);
185
185
  return [4
186
186
  /*yield*/
187
- , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offers/contract/offercatgs", {}, 'GET')];
187
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/offercatgs/list", {}, 'GET')];
188
188
 
189
189
  case 1:
190
190
  res = _a.sent();
@@ -346,7 +346,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
346
346
  case 0:
347
347
  return [4
348
348
  /*yield*/
349
- , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offers/contract/offercatgs", {}, 'GET')];
349
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/offercatgs/list", {}, 'GET')];
350
350
 
351
351
  case 1:
352
352
  res = _a.sent();
@@ -368,7 +368,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
368
368
  case 0:
369
369
  return [4
370
370
  /*yield*/
371
- , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/stores/contract/brands", {}, 'GET')];
371
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/brand/list", {}, 'GET')];
372
372
 
373
373
  case 1:
374
374
  res = _a.sent();
@@ -309,7 +309,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
309
309
  case 0:
310
310
  return [4
311
311
  /*yield*/
312
- , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/stores/contract/brands")];
312
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/brand/list")];
313
313
 
314
314
  case 1:
315
315
  res = _a.sent();
@@ -65,16 +65,47 @@ function (_super) {
65
65
  __extends(Carousel, _super);
66
66
 
67
67
  function Carousel() {
68
- return _super !== null && _super.apply(this, arguments) || this;
68
+ var _this = _super !== null && _super.apply(this, arguments) || this;
69
+
70
+ _this.state = {
71
+ show: false
72
+ };
73
+ _this.carouselRef = /*#__PURE__*/_react["default"].createRef();
74
+ _this.intersectionObserver = null;
75
+ return _this;
69
76
  }
70
77
 
78
+ Carousel.prototype.componentDidMount = function () {
79
+ var _this = this;
80
+
81
+ this.intersectionObserver = new IntersectionObserver(function (entries) {
82
+ if (entries[0].isIntersecting) {
83
+ _this.setState({
84
+ show: true
85
+ });
86
+ }
87
+ }, {
88
+ root: null,
89
+ // threshold: 0.8,
90
+ rootMargin: '0px 0px 100px 0px'
91
+ });
92
+ this.intersectionObserver.observe(this.carouselRef.current);
93
+ };
94
+
95
+ Carousel.prototype.componentWillUnmount = function () {
96
+ this.intersectionObserver.disconnect(this.carouselRef.current);
97
+ };
98
+
71
99
  Carousel.prototype.render = function () {
72
100
  var nodeData = this.props.nodeData;
73
- return /*#__PURE__*/_react["default"].createElement("div", null, window.magicDesign.device === 'pc' ? /*#__PURE__*/_react["default"].createElement(_pc["default"], {
101
+ var show = this.state.show;
102
+ return /*#__PURE__*/_react["default"].createElement("div", {
103
+ ref: this.carouselRef
104
+ }, show && (window.magicDesign.device === 'pc' ? /*#__PURE__*/_react["default"].createElement(_pc["default"], {
74
105
  data: nodeData
75
106
  }) : /*#__PURE__*/_react["default"].createElement(_mobile["default"], {
76
107
  data: nodeData
77
- }));
108
+ })));
78
109
  };
79
110
 
80
111
  Carousel.defaultProps = {};
@@ -247,7 +247,8 @@ function (_super) {
247
247
  GAData: __assign(__assign({}, GAData), {
248
248
  groupId: item.id,
249
249
  groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
250
- })
250
+ }),
251
+ notNeedLazy: true
251
252
  })), layout === 'layout2' && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, item.title.open && /*#__PURE__*/_react["default"].createElement("div", {
252
253
  className: "title"
253
254
  }, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
@@ -272,7 +273,8 @@ function (_super) {
272
273
  groupId: item.id,
273
274
  groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
274
275
  }),
275
- maxHeight: 20
276
+ maxHeight: 20,
277
+ notNeedLazy: true
276
278
  }), item.buttonTag.open && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
277
279
  data: item.buttonTag,
278
280
  GAData: __assign(__assign({}, GAData), {
@@ -280,7 +280,8 @@ function (_super) {
280
280
  }),
281
281
  maxHeight: item.image.content.pcImgSrc ? 'unset' : PC_IMG_SIZE[floorColNum].defH,
282
282
  minHeight: PC_IMG_SIZE[floorColNum].minH,
283
- minWidth: PC_IMG_SIZE[floorColNum].minW
283
+ minWidth: PC_IMG_SIZE[floorColNum].minW,
284
+ notNeedLazy: true
284
285
  })), layout === 'layout2' && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, item.title.open && !((0, _coreUtil.isPc)() && item.title.pcText === '') && /*#__PURE__*/_react["default"].createElement("div", {
285
286
  className: "title"
286
287
  }, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
@@ -305,7 +306,8 @@ function (_super) {
305
306
  groupId: item.id,
306
307
  groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
307
308
  }),
308
- maxHeight: 30
309
+ maxHeight: 30,
310
+ notNeedLazy: true
309
311
  }), item.buttonTag.open && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
310
312
  data: item.buttonTag,
311
313
  GAData: __assign(__assign({}, GAData), {
@@ -8,21 +8,26 @@ exports.getDefaultJSON = void 0;
8
8
  var _uuid = require("uuid");
9
9
 
10
10
  var getDefaultJSON = function getDefaultJSON() {
11
+ var groupId = (0, _uuid.v4)();
11
12
  return {
12
- id: (0, _uuid.v4)(),
13
+ id: groupId,
13
14
  type: 'LOCATION',
14
- content: {
15
- logo: {
16
- open: true,
17
- color: '#fff'
18
- },
19
- address: {
20
- open: true
21
- },
22
- icon: {
23
- open: true,
24
- color: '#fff'
25
- }
15
+ logo: {
16
+ parentId: groupId,
17
+ id: (0, _uuid.v4)(),
18
+ open: true,
19
+ color: '#fff'
20
+ },
21
+ address: {
22
+ parentId: groupId,
23
+ id: (0, _uuid.v4)(),
24
+ open: true
25
+ },
26
+ icon: {
27
+ parentId: groupId,
28
+ id: (0, _uuid.v4)(),
29
+ open: true,
30
+ color: '#fff'
26
31
  },
27
32
  spacing: {
28
33
  pc: {
@@ -31,8 +36,9 @@ var getDefaultJSON = function getDefaultJSON() {
31
36
  marginBottom: 0
32
37
  },
33
38
  mobile: {
34
- paddingTop: 10,
35
- paddingBottom: 10,
39
+ paddingTop: 12,
40
+ paddingBottom: 12,
41
+ paddingLeft: 12,
36
42
  marginBottom: 0
37
43
  }
38
44
  },
@@ -44,7 +50,7 @@ var getDefaultJSON = function getDefaultJSON() {
44
50
  },
45
51
  background: {
46
52
  opacity: 100,
47
- color: '#fff',
53
+ color: '#597EF7',
48
54
  image: '',
49
55
  bgType: 'color'
50
56
  }
@@ -9,9 +9,11 @@ var _react = _interopRequireWildcard(require("react"));
9
9
 
10
10
  var _defaultJSON = require("./defaultJSON");
11
11
 
12
+ var _common = require("../../../../common");
13
+
12
14
  var _compositeDecorator = _interopRequireDefault(require("../../../../decorator/compositeDecorator"));
13
15
 
14
- var _coreUtil = require("../../../../utils/coreUtil");
16
+ require("./index.less");
15
17
 
16
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17
19
 
@@ -63,68 +65,28 @@ function (_super) {
63
65
  __extends(CustomCode, _super);
64
66
 
65
67
  function CustomCode() {
66
- var _this = _super !== null && _super.apply(this, arguments) || this;
67
-
68
- _this.htmlTemp = ''; // createHtml = () => {
69
- // const { nodeData } = this.props;
70
- // const htmlCode = window.magicDesign.device === 'pc' ? nodeData.content.pcHtml : nodeData.content.h5Html;
71
- // this.htmlTemp = htmlCode;
72
- // if (document.getElementById('custom-wrap')) {
73
- // document.getElementById('custom-wrap').innerHTML = htmlCode;
74
- // }
75
- // }
76
-
77
- _this.handleClick = function (e) {
78
- console.log(e.target.getAttribute('href'));
79
- (0, _coreUtil.clickUrl)(e.target.getAttribute('href'));
80
- };
81
-
82
- return _this;
68
+ return _super !== null && _super.apply(this, arguments) || this;
83
69
  }
84
70
 
85
- CustomCode.prototype.componentDidMount = function () {
86
- var _this = this;
87
-
88
- var aElements = document.querySelectorAll('#custom-wrap a');
89
- aElements.forEach(function (element) {
90
- element.addEventListener('click', _this.handleClick);
91
- });
92
- };
93
-
94
- CustomCode.prototype.componentWillUnmount = function () {
95
- var _this = this;
96
-
97
- var aElements = document.querySelectorAll('#custom-wrap a');
98
- aElements.forEach(function (element) {
99
- element.removeEventListener('click', _this.handleClick);
100
- });
101
- }; // componentWillReceiveProps(prevProps) {
102
- // console.log('111111');
103
- // if (window.magicDesign.device === 'pc') {
104
- // console.log('22222222');
105
- // if (prevProps.nodeData.content.pcHtml != this.props.nodeData.content.pcHtml) {
106
- // console.log('4444444');
107
- // this.createHtml();
108
- // }
109
- // } else {
110
- // console.log('3333333333', this.htmlTemp, this.props.nodeData.content);
111
- // if (this.htmlTemp != this.props.nodeData.content.h5Html) {
112
- // console.log('5555555');
113
- // this.createHtml();
114
- // }
115
- // }
116
- // }
117
-
71
+ CustomCode.prototype.componentDidMount = function () {};
118
72
 
119
73
  CustomCode.prototype.render = function () {
120
74
  var nodeData = this.props.nodeData;
121
- return /*#__PURE__*/_react["default"].createElement("div", {
122
- id: "custom-wrap"
123
- }, /*#__PURE__*/_react["default"].createElement("div", {
124
- dangerouslySetInnerHTML: {
125
- __html: window.magicDesign.device === 'pc' ? nodeData.content.pcHtml : nodeData.content.h5Html
126
- }
127
- }));
75
+ return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, window.magicDesign.device === 'pc' ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null) : /*#__PURE__*/_react["default"].createElement("div", {
76
+ className: "location-mobile"
77
+ }, nodeData.logo.open && /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
78
+ className: "logo",
79
+ color: nodeData.logo.color,
80
+ size: 20,
81
+ type: "icon-MapPin"
82
+ }), nodeData.address.open && /*#__PURE__*/_react["default"].createElement("div", {
83
+ className: "address"
84
+ }, "Display Location Address"), nodeData.icon.open && /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
85
+ className: "logo",
86
+ color: nodeData.icon.color,
87
+ size: 16,
88
+ type: "icon-outlined-right"
89
+ })));
128
90
  };
129
91
 
130
92
  CustomCode.defaultProps = {};
@@ -0,0 +1,15 @@
1
+ .location-mobile {
2
+ display: flex;
3
+ align-items: center;
4
+ .logo {
5
+ margin-right: 6px;
6
+ }
7
+ .address {
8
+ font-family: Open Sans;
9
+ font-size: 14px;
10
+ font-weight: 400;
11
+ line-height: 18px;
12
+ color: #fff;
13
+ }
14
+
15
+ }
@@ -7,7 +7,7 @@ exports["default"] = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
10
- var _MyEditor = _interopRequireDefault(require("./MyEditor"));
10
+ var _common = require("../../../../common");
11
11
 
12
12
  var _coreUtil = require("../../../../utils/coreUtil");
13
13
 
@@ -53,32 +53,62 @@ var __extends = void 0 && (void 0).__extends || function () {
53
53
  };
54
54
  }();
55
55
 
56
- var CustomCodeConfig =
56
+ var LocationConfig =
57
57
  /** @class */
58
58
  function (_super) {
59
- __extends(CustomCodeConfig, _super);
59
+ __extends(LocationConfig, _super);
60
60
 
61
- function CustomCodeConfig() {
61
+ function LocationConfig() {
62
62
  var _this = _super !== null && _super.apply(this, arguments) || this;
63
63
 
64
- _this.changeVal = function (v) {
64
+ _this.getContentPanel = function () {
65
65
  var data = _this.props.data;
66
-
67
- if ((0, _coreUtil.isPc)()) {
68
- data.content.pcHtml = v;
69
- } else {
70
- data.content.h5Html = v;
71
- }
72
- };
73
-
74
- _this.blurArea = function () {
75
- _this.selfRender();
66
+ var source = [{
67
+ key: data.logo.id,
68
+ name: (0, _locale.i18n)('LOCATION_LOGO'),
69
+ value: /*#__PURE__*/_react["default"].createElement(_common.Field, null, /*#__PURE__*/_react["default"].createElement(_common.ColorPickerInput, {
70
+ colorType: "rgba",
71
+ onChange: function onChange(v) {
72
+ data.logo.color = v;
73
+
74
+ _this.selfRender();
75
+ },
76
+ value: data.logo.color
77
+ })),
78
+ metaOption: data.logo
79
+ }, {
80
+ key: data.address.id,
81
+ name: (0, _locale.i18n)('ADDRESS'),
82
+ metaOption: data.address
83
+ }, {
84
+ key: data.icon.id,
85
+ name: (0, _locale.i18n)('ICON'),
86
+ value: /*#__PURE__*/_react["default"].createElement(_common.Field, null, /*#__PURE__*/_react["default"].createElement(_common.ColorPickerInput, {
87
+ colorType: "rgba",
88
+ onChange: function onChange(v) {
89
+ data.icon.color = v;
90
+
91
+ _this.selfRender();
92
+ },
93
+ value: data.icon.color
94
+ })),
95
+ metaOption: data.icon
96
+ }];
97
+ return /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
98
+ headerSize: "middle",
99
+ onRefresh: function onRefresh() {
100
+ return (0, _coreUtil.renderPreview)();
101
+ },
102
+ showActiveColor: true,
103
+ source: source,
104
+ type: "switch"
105
+ });
76
106
  };
77
107
 
78
108
  return _this;
79
109
  }
80
110
 
81
- CustomCodeConfig.prototype.render = function () {
111
+ LocationConfig.prototype.render = function () {
82
112
  var data = this.props.data;
83
113
  return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
84
114
  divider: "bold",
@@ -86,11 +116,7 @@ function (_super) {
86
116
  source: [{
87
117
  key: 'content',
88
118
  name: (0, _locale.i18n)('CONTENT'),
89
- value: /*#__PURE__*/_react["default"].createElement(_MyEditor["default"], {
90
- blurArea: this.blurArea,
91
- changeVal: this.changeVal,
92
- value: (0, _coreUtil.isPc)() ? data.content.pcHtml : data.content.h5Html
93
- })
119
+ value: this.getContentPanel()
94
120
  }, {
95
121
  key: 'spacing',
96
122
  name: (0, _locale.i18n)('SPACING'),
@@ -102,6 +128,7 @@ function (_super) {
102
128
  name: (0, _locale.i18n)('CUSTOMIZE'),
103
129
  value: /*#__PURE__*/_react["default"].createElement(_CustomizeConfig["default"], {
104
130
  data: data.customize,
131
+ isHideAlign: true,
105
132
  layoutSource: _layout.locationLayout
106
133
  })
107
134
  }, {
@@ -115,8 +142,8 @@ function (_super) {
115
142
  }));
116
143
  };
117
144
 
118
- return CustomCodeConfig;
145
+ return LocationConfig;
119
146
  }(_BaseConfig["default"]);
120
147
 
121
- var _default = CustomCodeConfig;
148
+ var _default = LocationConfig;
122
149
  exports["default"] = _default;
@@ -310,17 +310,21 @@ function (_super) {
310
310
 
311
311
  _this.toChat = function () {
312
312
  var storeInfo = _this.state.storeInfo; // 登录情况下,直接跳聊天页
313
-
314
- if (localStorage.getItem('isLogin') === 'Y') {
315
- (0, _commonUtil.navigateTo)("/chat/" + (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.sysAccount));
316
- } else {
317
- window.magicDesign.history.push({
318
- pathname: '/sign-in',
319
- state: {
320
- redirectUrl: "/chat/" + (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.sysAccount)
321
- }
322
- });
323
- }
313
+ // if (localStorage.getItem('isLogin') === 'Y') {
314
+ // navigateTo(`/chat/${storeInfo?.sysAccount}`);
315
+ // } else {
316
+ // window.magicDesign.history.push({ pathname: '/sign-in', state: { redirectUrl: `/chat/${storeInfo?.sysAccount}` } });
317
+ // }
318
+
319
+ var params = {
320
+ action: 'operation',
321
+ params: {
322
+ type: 'CHAT',
323
+ storeId: storeInfo.storeId,
324
+ sysAccount: storeInfo.sysAccount
325
+ }
326
+ };
327
+ window.magicDesign.handleAction(params);
324
328
  };
325
329
 
326
330
  return _this;
@@ -383,7 +387,7 @@ function (_super) {
383
387
  src: _star["default"]
384
388
  })), /*#__PURE__*/_react["default"].createElement("div", {
385
389
  className: "number"
386
- }, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.userCollectionNum) || '1000+', " "), " ", (0, _locale.i18n)('FOLLOWERS')), /*#__PURE__*/_react["default"].createElement("div", {
390
+ }, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.userCollectionNum) || '1000+', " "), " ", (0, _locale.i18n)('FOLLOWERS')), (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.hasCustomerService) === 'Y' && /*#__PURE__*/_react["default"].createElement("div", {
387
391
  className: "chat-btn",
388
392
  onClick: this.toChat
389
393
  }, (0, _locale.i18n)('CHAT'))));
@@ -275,7 +275,7 @@ function (_super) {
275
275
  ];
276
276
  return [4
277
277
  /*yield*/
278
- , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/stores/contract/brands")];
278
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/brand/list")];
279
279
 
280
280
  case 3:
281
281
  res = _a.sent();
@@ -29,6 +29,8 @@ var _Wallet = _interopRequireDefault(require("../composite-comp/bol/components/W
29
29
 
30
30
  var _CustomCode = _interopRequireDefault(require("../composite-comp/bol/components/CustomCode"));
31
31
 
32
+ var _Location = _interopRequireDefault(require("../composite-comp/bol/components/Location"));
33
+
32
34
  var _FlashDeal = _interopRequireDefault(require("../composite-comp/dito/components/FlashDeal"));
33
35
 
34
36
  var _SearchBar = _interopRequireDefault(require("../composite-comp/dito/components/SearchBar"));
@@ -63,6 +65,8 @@ var _VideoConfig = _interopRequireDefault(require("../composite-comp/bol/config-
63
65
 
64
66
  var _CustomCodeConfig = _interopRequireDefault(require("../composite-comp/bol/config-panels/CustomCodeConfig"));
65
67
 
68
+ var _LocationConfig = _interopRequireDefault(require("../composite-comp/bol/config-panels/LocationConfig"));
69
+
66
70
  var _WalletConfig = _interopRequireDefault(require("../composite-comp/bol/config-panels/WalletConfig"));
67
71
 
68
72
  var _FlashDealConfig = _interopRequireDefault(require("../composite-comp/dito/config-panels/FlashDealConfig"));
@@ -109,13 +113,13 @@ var _a, _b, _c; // 组件
109
113
  /**
110
114
  * 渲染组件索引
111
115
  */
112
- var componentMap = (_a = {}, _a[_Banner["default"].type] = _Banner["default"], _a[_Video["default"].type] = _Video["default"], _a[_Text["default"].type] = _Text["default"], _a[_FlashDeal["default"].type] = _FlashDeal["default"], _a[_SearchBar["default"].type] = _SearchBar["default"], _a[_SignBoard["default"].type] = _SignBoard["default"], _a[_ImageText["default"].type] = _ImageText["default"], _a[_Recommend["default"].type] = _Recommend["default"], _a[_MobileNavigation["default"].type] = _MobileNavigation["default"], _a[_PcNavigation["default"].type] = _PcNavigation["default"], _a[_Divider["default"].type] = _Divider["default"], _a[_ImageGallery["default"].type] = _ImageGallery["default"], _a[_Newsletter["default"].type] = _Newsletter["default"], _a[_Carousel["default"].type] = _Carousel["default"], _a[_Button["default"].type] = _Button["default"], _a[_Tag["default"].type] = _Tag["default"], _a[_Wallet["default"].type] = _Wallet["default"], _a[_CustomCode["default"].type] = _CustomCode["default"], _a);
116
+ var componentMap = (_a = {}, _a[_Banner["default"].type] = _Banner["default"], _a[_Video["default"].type] = _Video["default"], _a[_Text["default"].type] = _Text["default"], _a[_FlashDeal["default"].type] = _FlashDeal["default"], _a[_SearchBar["default"].type] = _SearchBar["default"], _a[_SignBoard["default"].type] = _SignBoard["default"], _a[_ImageText["default"].type] = _ImageText["default"], _a[_Recommend["default"].type] = _Recommend["default"], _a[_MobileNavigation["default"].type] = _MobileNavigation["default"], _a[_PcNavigation["default"].type] = _PcNavigation["default"], _a[_Divider["default"].type] = _Divider["default"], _a[_ImageGallery["default"].type] = _ImageGallery["default"], _a[_Newsletter["default"].type] = _Newsletter["default"], _a[_Carousel["default"].type] = _Carousel["default"], _a[_Button["default"].type] = _Button["default"], _a[_Tag["default"].type] = _Tag["default"], _a[_Wallet["default"].type] = _Wallet["default"], _a[_CustomCode["default"].type] = _CustomCode["default"], _a[_Location["default"].type] = _Location["default"], _a);
113
117
  /**
114
118
  * 一级配置面板索引
115
119
  */
116
120
 
117
121
  exports.componentMap = componentMap;
118
- var configPanelMap = (_b = {}, _b[_Banner["default"].type] = _BannerConfig["default"], _b[_Video["default"].type] = _VideoConfig["default"], _b[_Text["default"].type] = _TextCompConfig["default"], _b[_FlashDeal["default"].type] = _FlashDealConfig["default"], _b[_SearchBar["default"].type] = _SearchBarConfig["default"], _b[_SignBoard["default"].type] = _SignBoardConfig["default"], _b[_ImageText["default"].type] = _ImageTextConfig["default"], _b[_Recommend["default"].type] = _RecommendConfig["default"], _b[_MobileNavigation["default"].type] = _MobileNavigationConfig["default"], _b[_PcNavigation["default"].type] = _PcNavigationConfig["default"], _b[_Divider["default"].type] = _DividerConfig["default"], _b[_ImageGallery["default"].type] = _ImageGalleryConfig["default"], _b[_Newsletter["default"].type] = _NewsletterConfig["default"], _b[_Carousel["default"].type] = _CarouselConfig["default"], _b[_Button["default"].type] = _ButtonCompConfig["default"], _b[_Tag["default"].type] = _TagCompConfig["default"], _b[_Wallet["default"].type] = _WalletConfig["default"], _b[_CustomCode["default"].type] = _CustomCodeConfig["default"], _b);
122
+ var configPanelMap = (_b = {}, _b[_Banner["default"].type] = _BannerConfig["default"], _b[_Video["default"].type] = _VideoConfig["default"], _b[_Text["default"].type] = _TextCompConfig["default"], _b[_FlashDeal["default"].type] = _FlashDealConfig["default"], _b[_SearchBar["default"].type] = _SearchBarConfig["default"], _b[_SignBoard["default"].type] = _SignBoardConfig["default"], _b[_ImageText["default"].type] = _ImageTextConfig["default"], _b[_Recommend["default"].type] = _RecommendConfig["default"], _b[_MobileNavigation["default"].type] = _MobileNavigationConfig["default"], _b[_PcNavigation["default"].type] = _PcNavigationConfig["default"], _b[_Divider["default"].type] = _DividerConfig["default"], _b[_ImageGallery["default"].type] = _ImageGalleryConfig["default"], _b[_Newsletter["default"].type] = _NewsletterConfig["default"], _b[_Carousel["default"].type] = _CarouselConfig["default"], _b[_Button["default"].type] = _ButtonCompConfig["default"], _b[_Tag["default"].type] = _TagCompConfig["default"], _b[_Wallet["default"].type] = _WalletConfig["default"], _b[_CustomCode["default"].type] = _CustomCodeConfig["default"], _b[_Location["default"].type] = _LocationConfig["default"], _b);
119
123
  /**
120
124
  * 二级配置面板索引
121
125
  */
@@ -129,6 +129,10 @@ var compInfoMap = {
129
129
  name: 'Image and Text',
130
130
  icon: 'icon-filled-image'
131
131
  },
132
+ LOCATION: {
133
+ name: 'Location',
134
+ icon: 'icon-location'
135
+ },
132
136
  CUSTOM_CODE: {
133
137
  name: 'Custom Code',
134
138
  icon: 'icon-html'
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.videoPCLayout = exports.videoH5Layout = exports.searchLayout = exports.recommendLayoutPc = exports.recommendLayoutMobile = exports.pcNavigationLayout = exports.newsletterLayout = exports.mobileNavigationLayout = exports.imageTextLayoutPc = exports.imageTextLayoutMobile = exports.imageGalleryLayout = exports.dividerLayout = exports.carouselLayout = exports.WalletLayout = void 0;
6
+ exports.videoPCLayout = exports.videoH5Layout = exports.searchLayout = exports.recommendLayoutPc = exports.recommendLayoutMobile = exports.pcNavigationLayout = exports.newsletterLayout = exports.mobileNavigationLayout = exports.locationLayout = exports.imageTextLayoutPc = exports.imageTextLayoutMobile = exports.imageGalleryLayout = exports.dividerLayout = exports.carouselLayout = exports.WalletLayout = void 0;
7
7
 
8
8
  var _dividerLayout = _interopRequireDefault(require("../assets/images/layout-icon/dividerLayout.svg"));
9
9
 
@@ -43,6 +43,8 @@ var _imageTextRight = _interopRequireDefault(require("../assets/images/layout-ic
43
43
 
44
44
  var _newsletter = _interopRequireDefault(require("../assets/images/layout-icon/newsletter.svg"));
45
45
 
46
+ var _locationLayout = _interopRequireDefault(require("../assets/images/layout-icon/locationLayout.png"));
47
+
46
48
  var _layoutRecommend = _interopRequireDefault(require("../assets/images/layout-icon/layout-recommend-1.png"));
47
49
 
48
50
  var _layoutRecommend2 = _interopRequireDefault(require("../assets/images/layout-icon/layout-recommend-2.png"));
@@ -90,6 +92,12 @@ var searchLayout = [{
90
92
  image: _layoutSearch["default"]
91
93
  }];
92
94
  exports.searchLayout = searchLayout;
95
+ var locationLayout = [{
96
+ id: 'top',
97
+ name: 'top',
98
+ image: _locationLayout["default"]
99
+ }];
100
+ exports.locationLayout = locationLayout;
93
101
  var imageGalleryLayout = [{
94
102
  id: 'layout1',
95
103
  name: 'layout1',
@@ -89,7 +89,7 @@ function (_super) {
89
89
  }), /*#__PURE__*/_react["default"].createElement("span", {
90
90
  className: "commit-btn",
91
91
  onClick: this.onCommit
92
- }, "\u786E\u5B9A"))));
92
+ }, "Confirm"))));
93
93
  };
94
94
 
95
95
  return LinkInputPicker;
@@ -89,7 +89,7 @@ function (_super) {
89
89
  }), /*#__PURE__*/_react["default"].createElement("span", {
90
90
  className: "commit-btn",
91
91
  onClick: this.onCommit
92
- }, "\u786E\u5B9A"))));
92
+ }, "Confirm"))));
93
93
  };
94
94
 
95
95
  return LinkInputPicker;
@@ -1,4 +1,6 @@
1
1
  {
2
+ "ADDRESS": "Address",
3
+ "LOCATION_LOGO": "Location Logo",
2
4
  "MESSAGE_ICON": "Message icon",
3
5
  "CART_ICON": "Cart icon",
4
6
  "RECOMMENDED_SIZE": "Recommended Size",
@@ -1,4 +1,6 @@
1
1
  {
2
+ "ADDRESS": "Address",
3
+ "LOCATION_LOGO": "Location Logo",
2
4
  "MESSAGE_ICON": "Message icon",
3
5
  "CART_ICON": "Cart icon",
4
6
  "RECOMMENDED_SIZE": "Recommended Size",