@fonixtree/magic-design 2.0.195 → 2.0.197

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.
@@ -102,7 +102,7 @@ function (_super) {
102
102
  }, /*#__PURE__*/_react["default"].createElement("div", {
103
103
  className: "address-wrap",
104
104
  onClick: function onClick() {
105
- return (0, _coreUtil.clickUrl)('/location');
105
+ return (0, _coreUtil.clickUrl)(locationInfo.address ? '/location' : '/add-location');
106
106
  }
107
107
  }, /*#__PURE__*/_react["default"].createElement("div", {
108
108
  className: "address-bg",
@@ -298,7 +298,8 @@ var newParseUrl = function newParseUrl(urlObj) {
298
298
  '/product/GroupBuy': 'GROUP',
299
299
  '/search-page': 'SEARCH_PAGE',
300
300
  '/commission': 'COMMISSION',
301
- '/location': 'ADD_ADDRESS_PAGE'
301
+ '/add-location': 'ADD_ADDRESS_PAGE',
302
+ '/location': 'ADDRESS_PAGE'
302
303
  };
303
304
  var typeTemp = map[link];
304
305
 
@@ -366,8 +367,8 @@ var parseUrl = function parseUrl(url) {
366
367
  action: 'jump',
367
368
  params: {
368
369
  type: 'PRODUCT_DETAIL',
369
- offerId: arg1,
370
- productId: arg2
370
+ offerId: Number(arg1),
371
+ productId: Number(arg2)
371
372
  }
372
373
  };
373
374
  break;
@@ -390,7 +391,7 @@ var parseUrl = function parseUrl(url) {
390
391
  action: 'jump',
391
392
  params: {
392
393
  type: 'STORE',
393
- storeId: arg1
394
+ storeId: Number(arg1)
394
395
  }
395
396
  };
396
397
  break;
@@ -476,7 +477,8 @@ var parseUrl = function parseUrl(url) {
476
477
  '/search-page': 'SEARCH_PAGE',
477
478
  '/main/my-commission': 'WALLET',
478
479
  '/commission': 'COMMISSION',
479
- '/location': 'ADD_ADDRESS_PAGE'
480
+ '/add-location': 'ADD_ADDRESS_PAGE',
481
+ '/location': 'ADDRESS_PAGE'
480
482
  };
481
483
  link = url;
482
484
  params = {
@@ -405,8 +405,8 @@ var clickUrl = function clickUrl(url, state) {
405
405
  (0, _commonUtil.navigateTo)(link, state);
406
406
  }
407
407
  } else if (((_b = window === null || window === void 0 ? void 0 : window.magicDesign) === null || _b === void 0 ? void 0 : _b.projectCode) === 'pto') {
408
- // 输入的是完整的跳转地址
409
- if (isUrl(link)) {
408
+ // 输入的是完整的跳转地址 排除掉‘https://www.baidu.com;mydito://BuyLoad’这种情况
409
+ if (isUrl(link) && !link.includes('mydito://')) {
410
410
  if (!link.includes(window.location.host)) {
411
411
  // 跳转外链 需要把token带上
412
412
  if (link.includes('?')) {
@@ -102,7 +102,7 @@ function (_super) {
102
102
  }, /*#__PURE__*/_react["default"].createElement("div", {
103
103
  className: "address-wrap",
104
104
  onClick: function onClick() {
105
- return (0, _coreUtil.clickUrl)('/location');
105
+ return (0, _coreUtil.clickUrl)(locationInfo.address ? '/location' : '/add-location');
106
106
  }
107
107
  }, /*#__PURE__*/_react["default"].createElement("div", {
108
108
  className: "address-bg",
@@ -298,7 +298,8 @@ var newParseUrl = function newParseUrl(urlObj) {
298
298
  '/product/GroupBuy': 'GROUP',
299
299
  '/search-page': 'SEARCH_PAGE',
300
300
  '/commission': 'COMMISSION',
301
- '/location': 'ADD_ADDRESS_PAGE'
301
+ '/add-location': 'ADD_ADDRESS_PAGE',
302
+ '/location': 'ADDRESS_PAGE'
302
303
  };
303
304
  var typeTemp = map[link];
304
305
 
@@ -366,8 +367,8 @@ var parseUrl = function parseUrl(url) {
366
367
  action: 'jump',
367
368
  params: {
368
369
  type: 'PRODUCT_DETAIL',
369
- offerId: arg1,
370
- productId: arg2
370
+ offerId: Number(arg1),
371
+ productId: Number(arg2)
371
372
  }
372
373
  };
373
374
  break;
@@ -390,7 +391,7 @@ var parseUrl = function parseUrl(url) {
390
391
  action: 'jump',
391
392
  params: {
392
393
  type: 'STORE',
393
- storeId: arg1
394
+ storeId: Number(arg1)
394
395
  }
395
396
  };
396
397
  break;
@@ -476,7 +477,8 @@ var parseUrl = function parseUrl(url) {
476
477
  '/search-page': 'SEARCH_PAGE',
477
478
  '/main/my-commission': 'WALLET',
478
479
  '/commission': 'COMMISSION',
479
- '/location': 'ADD_ADDRESS_PAGE'
480
+ '/add-location': 'ADD_ADDRESS_PAGE',
481
+ '/location': 'ADDRESS_PAGE'
480
482
  };
481
483
  link = url;
482
484
  params = {
@@ -405,8 +405,8 @@ var clickUrl = function clickUrl(url, state) {
405
405
  (0, _commonUtil.navigateTo)(link, state);
406
406
  }
407
407
  } else if (((_b = window === null || window === void 0 ? void 0 : window.magicDesign) === null || _b === void 0 ? void 0 : _b.projectCode) === 'pto') {
408
- // 输入的是完整的跳转地址
409
- if (isUrl(link)) {
408
+ // 输入的是完整的跳转地址 排除掉‘https://www.baidu.com;mydito://BuyLoad’这种情况
409
+ if (isUrl(link) && !link.includes('mydito://')) {
410
410
  if (!link.includes(window.location.host)) {
411
411
  // 跳转外链 需要把token带上
412
412
  if (link.includes('?')) {
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.195",
4
+ "version": "2.0.197",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",