@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.
- package/es/utils/coreUtil.js +6 -11
- package/lib/utils/coreUtil.js +6 -11
- package/package.json +1 -1
package/es/utils/coreUtil.js
CHANGED
|
@@ -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 (
|
|
363
|
-
|
|
364
|
-
|
|
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
|
-
|
|
366
|
+
var a = link + "?token=" + (localStorage.getItem('h5Token') || '');
|
|
367
|
+
window.open(a);
|
|
373
368
|
}
|
|
374
369
|
}
|
|
375
370
|
} else {
|
package/lib/utils/coreUtil.js
CHANGED
|
@@ -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 (
|
|
363
|
-
|
|
364
|
-
|
|
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
|
-
|
|
366
|
+
var a = link + "?token=" + (localStorage.getItem('h5Token') || '');
|
|
367
|
+
window.open(a);
|
|
373
368
|
}
|
|
374
369
|
}
|
|
375
370
|
} else {
|