@fonixtree/magic-design 2.0.67 → 2.0.68

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.
@@ -358,18 +358,13 @@ var clickUrl = function clickUrl(url) {
358
358
 
359
359
  if (isUrl(link)) {
360
360
  if (!link.includes(window.location.host)) {
361
- // 跳转外链
362
- if (localStorage.getItem('isLogin') === 'Y') {
363
- // 登录情况下 需要把token带上
364
- if (link.includes('?')) {
365
- var a = link + "&token=" + localStorage.getItem('h5Token');
366
- window.open(a);
367
- } else {
368
- var a = link + "?token=" + localStorage.getItem('h5Token');
369
- window.open(a);
370
- }
361
+ // 跳转外链 需要把token带上
362
+ if (link.includes('?')) {
363
+ var a = link + "&token=" + (localStorage.getItem('h5Token') || '');
364
+ window.open(a);
371
365
  } else {
372
- window.open(link);
366
+ var a = link + "?token=" + (localStorage.getItem('h5Token') || '');
367
+ window.open(a);
373
368
  }
374
369
  }
375
370
  } else {
@@ -358,18 +358,13 @@ var clickUrl = function clickUrl(url) {
358
358
 
359
359
  if (isUrl(link)) {
360
360
  if (!link.includes(window.location.host)) {
361
- // 跳转外链
362
- if (localStorage.getItem('isLogin') === 'Y') {
363
- // 登录情况下 需要把token带上
364
- if (link.includes('?')) {
365
- var a = link + "&token=" + localStorage.getItem('h5Token');
366
- window.open(a);
367
- } else {
368
- var a = link + "?token=" + localStorage.getItem('h5Token');
369
- window.open(a);
370
- }
361
+ // 跳转外链 需要把token带上
362
+ if (link.includes('?')) {
363
+ var a = link + "&token=" + (localStorage.getItem('h5Token') || '');
364
+ window.open(a);
371
365
  } else {
372
- window.open(link);
366
+ var a = link + "?token=" + (localStorage.getItem('h5Token') || '');
367
+ window.open(a);
373
368
  }
374
369
  }
375
370
  } else {
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.67",
4
+ "version": "2.0.68",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",