@fonixtree/magic-design 2.0.90 → 2.0.92

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 (25) hide show
  1. package/es/assets/fonts/.DS_Store +0 -0
  2. package/es/common/LinkModal/AffiliateStore/index.js +1 -1
  3. package/es/composite-comp/dito/components/CommonFunctions/mobile/index.js +7 -1
  4. package/es/composite-comp/dito/components/CommonFunctions/mobile/index.less +3 -3
  5. package/es/composite-comp/dito/components/Orders/mobile/index.js +6 -1
  6. package/es/composite-comp/dito/components/Orders/mobile/index.less +5 -1
  7. package/es/composite-comp/dito/components/PersonalInformation/mobile/index.js +6 -1
  8. package/es/composite-comp/dito/components/PersonalInformation/mobile/index.less +7 -5
  9. package/es/constants/index.js +1 -0
  10. package/es/utils/businessUtil.js +12 -0
  11. package/es/utils/commonUtil.js +6 -4
  12. package/es/utils/coreUtil.js +3 -8
  13. package/lib/assets/fonts/.DS_Store +0 -0
  14. package/lib/common/LinkModal/AffiliateStore/index.js +1 -1
  15. package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.js +7 -1
  16. package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.less +3 -3
  17. package/lib/composite-comp/dito/components/Orders/mobile/index.js +6 -1
  18. package/lib/composite-comp/dito/components/Orders/mobile/index.less +5 -1
  19. package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.js +6 -1
  20. package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.less +7 -5
  21. package/lib/constants/index.js +1 -0
  22. package/lib/utils/businessUtil.js +12 -0
  23. package/lib/utils/commonUtil.js +6 -4
  24. package/lib/utils/coreUtil.js +3 -8
  25. package/package.json +1 -1
Binary file
@@ -229,7 +229,7 @@ function AffiliateStore(props) {
229
229
  }, []);
230
230
  var columns = [{
231
231
  title: 'Store ID',
232
- dataIndex: 'affiliateStoreId'
232
+ dataIndex: 'shopId'
233
233
  }, {
234
234
  title: 'Store Name',
235
235
  dataIndex: 'storeName'
@@ -79,9 +79,15 @@ function (_super) {
79
79
  onClick: function onClick() {
80
80
  return _this.onItemClick(item);
81
81
  }
82
- }, /*#__PURE__*/_react["default"].createElement("div", null, item.image.open && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
82
+ }, /*#__PURE__*/_react["default"].createElement("div", {
83
+ className: "content-wrap",
84
+ style: {
85
+ pointerEvents: window.magicDesign.mode == 'designer' ? 'auto' : 'none'
86
+ }
87
+ }, item.image.open && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
83
88
  className: "img",
84
89
  data: item.image,
90
+ disabled: true,
85
91
  maxWidth: "100%"
86
92
  }), item.title.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
87
93
  className: "title",
@@ -14,16 +14,16 @@
14
14
  justify-content: space-between;
15
15
  align-items: center;
16
16
  }
17
- .common-functions-mobile ul li > div {
17
+ .common-functions-mobile ul li .content-wrap {
18
18
  display: flex;
19
19
  align-items: center;
20
20
  }
21
- .common-functions-mobile ul li > div .img {
21
+ .common-functions-mobile ul li .content-wrap .img {
22
22
  width: 0.56rem;
23
23
  height: 0.56rem;
24
24
  margin-right: 0.08rem;
25
25
  }
26
- .common-functions-mobile ul li > div .title {
26
+ .common-functions-mobile ul li .content-wrap .title {
27
27
  font-size: 0.28rem;
28
28
  font-weight: 500;
29
29
  line-height: 0.4rem;
@@ -323,6 +323,11 @@ function (_super) {
323
323
  onClick: function onClick() {
324
324
  return _this.onItemClick(item.sourceType);
325
325
  }
326
+ }, /*#__PURE__*/_react["default"].createElement("div", {
327
+ className: "content-wrap",
328
+ style: {
329
+ pointerEvents: window.magicDesign.mode == 'designer' ? 'auto' : 'none'
330
+ }
326
331
  }, /*#__PURE__*/_react["default"].createElement("div", {
327
332
  className: "img-wrap"
328
333
  }, item.image.open && _this.getImageHtml(item)), item.title.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
@@ -331,7 +336,7 @@ function (_super) {
331
336
  onTextInput: function onTextInput(text) {
332
337
  item.title.text = text;
333
338
  }
334
- }));
339
+ })));
335
340
  }))));
336
341
  };
337
342
 
@@ -44,11 +44,15 @@
44
44
  margin-bottom: 0.02rem;
45
45
  }
46
46
  .orders-mobile .fixed-wrap .list .item {
47
+ display: flex;
48
+ flex: 1 1;
49
+ }
50
+ .orders-mobile .fixed-wrap .list .item .content-wrap {
51
+ width: 100%;
47
52
  display: flex;
48
53
  flex-direction: column;
49
54
  justify-content: center;
50
55
  align-items: center;
51
- flex: 1;
52
56
  }
53
57
  .orders-mobile .fixed-wrap .list .item .img-wrap {
54
58
  position: relative;
@@ -551,6 +551,11 @@ function (_super) {
551
551
  onClick: function onClick() {
552
552
  return _this.onItemClick(item.sourceType);
553
553
  }
554
+ }, /*#__PURE__*/_react["default"].createElement("div", {
555
+ className: "content-wrap",
556
+ style: {
557
+ pointerEvents: window.magicDesign.mode == 'designer' ? 'auto' : 'none'
558
+ }
554
559
  }, item.number.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
555
560
  className: "number",
556
561
  data: __assign(__assign({}, item.number), {
@@ -563,7 +568,7 @@ function (_super) {
563
568
  onTextInput: function onTextInput(text) {
564
569
  item.title.text = text;
565
570
  }
566
- }));
571
+ })));
567
572
  })), editImgModalVisible && /*#__PURE__*/_react["default"].createElement(_common.CropperModal, {
568
573
  onClose: function onClose() {
569
574
  _this.setState({
@@ -96,11 +96,6 @@
96
96
  margin-top: 0.48rem;
97
97
  }
98
98
  .personal-information-mobile .bottom .item {
99
- display: flex;
100
- flex-direction: column;
101
- justify-content: flex-start;
102
- align-items: center;
103
- flex: 1;
104
99
  position: relative;
105
100
  }
106
101
  .personal-information-mobile .bottom .item:after {
@@ -116,6 +111,13 @@
116
111
  .personal-information-mobile .bottom .item:last-child:after {
117
112
  display: none;
118
113
  }
114
+ .personal-information-mobile .bottom .item .content-wrap {
115
+ display: flex;
116
+ flex-direction: column;
117
+ justify-content: flex-start;
118
+ align-items: center;
119
+ flex: 1;
120
+ }
119
121
  .personal-information-mobile .bottom .item .number {
120
122
  width: 70% !important;
121
123
  font-size: 0.36rem;
@@ -84,6 +84,7 @@ var urlTypeMap = {
84
84
  MINI_APP: 'MiniApp',
85
85
  STORE: 'Store',
86
86
  AFFILIATE_PRODUCT: 'AffiliateProduct',
87
+ AFFILIATE_STORE: 'AffiliateStore',
87
88
  ANCHOR: 'Anchor'
88
89
  };
89
90
  exports.urlTypeMap = urlTypeMap;
@@ -182,6 +182,18 @@ var newParseUrl = function newParseUrl(urlObj) {
182
182
  };
183
183
  break;
184
184
 
185
+ case _constants.urlTypeMap.AFFILIATE_STORE:
186
+ // 分销店铺
187
+ link = "/storeDetail/" + value;
188
+ params = {
189
+ action: 'jump',
190
+ params: {
191
+ type: 'AFFILIATE_STORE',
192
+ url: value
193
+ }
194
+ };
195
+ break;
196
+
185
197
  default:
186
198
  var map = {
187
199
  '/main/cart': 'CART',
@@ -296,7 +296,9 @@ function commonFetch(url, data, method) {
296
296
  });
297
297
  }
298
298
 
299
- var navigateTo = function navigateTo(url) {
299
+ var navigateTo = function navigateTo(url, state) {
300
+ console.log('navigateTo', url);
301
+
300
302
  if (!url) {
301
303
  return;
302
304
  }
@@ -309,7 +311,7 @@ var navigateTo = function navigateTo(url) {
309
311
  if (!appUrl && !h5Url.startsWith('/')) {
310
312
  window.location.href = h5Url;
311
313
  } else if (window.magicDesign.history) {
312
- window.magicDesign.history.push(url);
314
+ window.magicDesign.history.push(url, state);
313
315
  } else if (window.magicDesign.navigatePreUrl) {
314
316
  // 预览模式跳转
315
317
  if (h5Url.startsWith('/')) {
@@ -748,8 +750,8 @@ function pushGA(data, eventName) {
748
750
  groupName: data.groupName,
749
751
  elementId: data.elementId,
750
752
  elementName: data.elementName
751
- };
752
- console.log('GA push', eventName, eventData);
753
+ }; // console.log('GA push', eventName, eventData);
754
+
753
755
  if (window.gtag) window.gtag('event', eventName, eventData);
754
756
  }
755
757
  } catch (error) {
@@ -320,14 +320,9 @@ var clickUrl = function clickUrl(url) {
320
320
  data = _b.data;
321
321
 
322
322
  var _c = data.params,
323
- params = _c === void 0 ? {} : _c;
324
- console.log('clicked data:', data);
325
- console.log({
326
- type: 'jumpBrowser',
327
- params: {
328
- url: params.link
329
- }
330
- });
323
+ params = _c === void 0 ? {} : _c; // console.log('clicked data:', data);
324
+ // console.log({ type: 'jumpBrowser', params: { url: params.link } });
325
+
331
326
  /** 锚点跳转 */
332
327
 
333
328
  if (params.type === 'ANCHOR') {
Binary file
@@ -229,7 +229,7 @@ function AffiliateStore(props) {
229
229
  }, []);
230
230
  var columns = [{
231
231
  title: 'Store ID',
232
- dataIndex: 'affiliateStoreId'
232
+ dataIndex: 'shopId'
233
233
  }, {
234
234
  title: 'Store Name',
235
235
  dataIndex: 'storeName'
@@ -79,9 +79,15 @@ function (_super) {
79
79
  onClick: function onClick() {
80
80
  return _this.onItemClick(item);
81
81
  }
82
- }, /*#__PURE__*/_react["default"].createElement("div", null, item.image.open && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
82
+ }, /*#__PURE__*/_react["default"].createElement("div", {
83
+ className: "content-wrap",
84
+ style: {
85
+ pointerEvents: window.magicDesign.mode == 'designer' ? 'auto' : 'none'
86
+ }
87
+ }, item.image.open && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
83
88
  className: "img",
84
89
  data: item.image,
90
+ disabled: true,
85
91
  maxWidth: "100%"
86
92
  }), item.title.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
87
93
  className: "title",
@@ -14,16 +14,16 @@
14
14
  justify-content: space-between;
15
15
  align-items: center;
16
16
  }
17
- .common-functions-mobile ul li > div {
17
+ .common-functions-mobile ul li .content-wrap {
18
18
  display: flex;
19
19
  align-items: center;
20
20
  }
21
- .common-functions-mobile ul li > div .img {
21
+ .common-functions-mobile ul li .content-wrap .img {
22
22
  width: 0.56rem;
23
23
  height: 0.56rem;
24
24
  margin-right: 0.08rem;
25
25
  }
26
- .common-functions-mobile ul li > div .title {
26
+ .common-functions-mobile ul li .content-wrap .title {
27
27
  font-size: 0.28rem;
28
28
  font-weight: 500;
29
29
  line-height: 0.4rem;
@@ -323,6 +323,11 @@ function (_super) {
323
323
  onClick: function onClick() {
324
324
  return _this.onItemClick(item.sourceType);
325
325
  }
326
+ }, /*#__PURE__*/_react["default"].createElement("div", {
327
+ className: "content-wrap",
328
+ style: {
329
+ pointerEvents: window.magicDesign.mode == 'designer' ? 'auto' : 'none'
330
+ }
326
331
  }, /*#__PURE__*/_react["default"].createElement("div", {
327
332
  className: "img-wrap"
328
333
  }, item.image.open && _this.getImageHtml(item)), item.title.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
@@ -331,7 +336,7 @@ function (_super) {
331
336
  onTextInput: function onTextInput(text) {
332
337
  item.title.text = text;
333
338
  }
334
- }));
339
+ })));
335
340
  }))));
336
341
  };
337
342
 
@@ -44,11 +44,15 @@
44
44
  margin-bottom: 0.02rem;
45
45
  }
46
46
  .orders-mobile .fixed-wrap .list .item {
47
+ display: flex;
48
+ flex: 1 1;
49
+ }
50
+ .orders-mobile .fixed-wrap .list .item .content-wrap {
51
+ width: 100%;
47
52
  display: flex;
48
53
  flex-direction: column;
49
54
  justify-content: center;
50
55
  align-items: center;
51
- flex: 1;
52
56
  }
53
57
  .orders-mobile .fixed-wrap .list .item .img-wrap {
54
58
  position: relative;
@@ -551,6 +551,11 @@ function (_super) {
551
551
  onClick: function onClick() {
552
552
  return _this.onItemClick(item.sourceType);
553
553
  }
554
+ }, /*#__PURE__*/_react["default"].createElement("div", {
555
+ className: "content-wrap",
556
+ style: {
557
+ pointerEvents: window.magicDesign.mode == 'designer' ? 'auto' : 'none'
558
+ }
554
559
  }, item.number.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
555
560
  className: "number",
556
561
  data: __assign(__assign({}, item.number), {
@@ -563,7 +568,7 @@ function (_super) {
563
568
  onTextInput: function onTextInput(text) {
564
569
  item.title.text = text;
565
570
  }
566
- }));
571
+ })));
567
572
  })), editImgModalVisible && /*#__PURE__*/_react["default"].createElement(_common.CropperModal, {
568
573
  onClose: function onClose() {
569
574
  _this.setState({
@@ -96,11 +96,6 @@
96
96
  margin-top: 0.48rem;
97
97
  }
98
98
  .personal-information-mobile .bottom .item {
99
- display: flex;
100
- flex-direction: column;
101
- justify-content: flex-start;
102
- align-items: center;
103
- flex: 1;
104
99
  position: relative;
105
100
  }
106
101
  .personal-information-mobile .bottom .item:after {
@@ -116,6 +111,13 @@
116
111
  .personal-information-mobile .bottom .item:last-child:after {
117
112
  display: none;
118
113
  }
114
+ .personal-information-mobile .bottom .item .content-wrap {
115
+ display: flex;
116
+ flex-direction: column;
117
+ justify-content: flex-start;
118
+ align-items: center;
119
+ flex: 1;
120
+ }
119
121
  .personal-information-mobile .bottom .item .number {
120
122
  width: 70% !important;
121
123
  font-size: 0.36rem;
@@ -84,6 +84,7 @@ var urlTypeMap = {
84
84
  MINI_APP: 'MiniApp',
85
85
  STORE: 'Store',
86
86
  AFFILIATE_PRODUCT: 'AffiliateProduct',
87
+ AFFILIATE_STORE: 'AffiliateStore',
87
88
  ANCHOR: 'Anchor'
88
89
  };
89
90
  exports.urlTypeMap = urlTypeMap;
@@ -182,6 +182,18 @@ var newParseUrl = function newParseUrl(urlObj) {
182
182
  };
183
183
  break;
184
184
 
185
+ case _constants.urlTypeMap.AFFILIATE_STORE:
186
+ // 分销店铺
187
+ link = "/storeDetail/" + value;
188
+ params = {
189
+ action: 'jump',
190
+ params: {
191
+ type: 'AFFILIATE_STORE',
192
+ url: value
193
+ }
194
+ };
195
+ break;
196
+
185
197
  default:
186
198
  var map = {
187
199
  '/main/cart': 'CART',
@@ -296,7 +296,9 @@ function commonFetch(url, data, method) {
296
296
  });
297
297
  }
298
298
 
299
- var navigateTo = function navigateTo(url) {
299
+ var navigateTo = function navigateTo(url, state) {
300
+ console.log('navigateTo', url);
301
+
300
302
  if (!url) {
301
303
  return;
302
304
  }
@@ -309,7 +311,7 @@ var navigateTo = function navigateTo(url) {
309
311
  if (!appUrl && !h5Url.startsWith('/')) {
310
312
  window.location.href = h5Url;
311
313
  } else if (window.magicDesign.history) {
312
- window.magicDesign.history.push(url);
314
+ window.magicDesign.history.push(url, state);
313
315
  } else if (window.magicDesign.navigatePreUrl) {
314
316
  // 预览模式跳转
315
317
  if (h5Url.startsWith('/')) {
@@ -748,8 +750,8 @@ function pushGA(data, eventName) {
748
750
  groupName: data.groupName,
749
751
  elementId: data.elementId,
750
752
  elementName: data.elementName
751
- };
752
- console.log('GA push', eventName, eventData);
753
+ }; // console.log('GA push', eventName, eventData);
754
+
753
755
  if (window.gtag) window.gtag('event', eventName, eventData);
754
756
  }
755
757
  } catch (error) {
@@ -320,14 +320,9 @@ var clickUrl = function clickUrl(url) {
320
320
  data = _b.data;
321
321
 
322
322
  var _c = data.params,
323
- params = _c === void 0 ? {} : _c;
324
- console.log('clicked data:', data);
325
- console.log({
326
- type: 'jumpBrowser',
327
- params: {
328
- url: params.link
329
- }
330
- });
323
+ params = _c === void 0 ? {} : _c; // console.log('clicked data:', data);
324
+ // console.log({ type: 'jumpBrowser', params: { url: params.link } });
325
+
331
326
  /** 锚点跳转 */
332
327
 
333
328
  if (params.type === 'ANCHOR') {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "2.0.90",
4
+ "version": "2.0.92",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",