n20-common-lib 1.3.60 → 1.3.61
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/package.json +1 -1
- package/src/utils/auth.js +3 -4
package/package.json
CHANGED
package/src/utils/auth.js
CHANGED
|
@@ -43,16 +43,15 @@ const auth = {
|
|
|
43
43
|
},
|
|
44
44
|
toLogin() {
|
|
45
45
|
let hrefOld = window.location.href
|
|
46
|
-
let loginHref = window.__POWERED_BY_QIANKUN__
|
|
47
|
-
? window.location.origin + '/login'
|
|
48
|
-
: ownLoginPath
|
|
46
|
+
let loginHref = window.__POWERED_BY_QIANKUN__ ? window.location.origin + '/login' : ownLoginPath
|
|
49
47
|
if (hrefOld !== loginHref) {
|
|
50
|
-
window.location.href = loginHref
|
|
48
|
+
window.location.href = sessionStorage.getItem('href') || loginHref
|
|
51
49
|
}
|
|
52
50
|
},
|
|
53
51
|
|
|
54
52
|
// 自定义跳转路径
|
|
55
53
|
customURL(href) {
|
|
54
|
+
sessionStorage.setItem('href', href)
|
|
56
55
|
// 判断有没有token,没有跳到自定义地址
|
|
57
56
|
auth.getToken() || (window.location.href = href)
|
|
58
57
|
}
|