vue2-client 1.8.286 → 1.8.288
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
CHANGED
package/src/router/guards.js
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
import AES from '@vue2-client/utils/EncryptUtil'
|
|
11
11
|
import Vue from 'vue'
|
|
12
12
|
import { funcToRouter, loadRoutes } from '@vue2-client/utils/routerUtil'
|
|
13
|
+
import { indexedDB } from '@vue2-client/utils/indexedDB'
|
|
13
14
|
|
|
14
15
|
NProgress.configure({ showSpinner: false })
|
|
15
16
|
|
|
@@ -49,6 +50,8 @@ const loginGuard = (to, from, next, options) => {
|
|
|
49
50
|
const { AESDecrypt } = AES
|
|
50
51
|
const info = AESDecrypt(token, '3KMKqvgwR8ULbR8Z')
|
|
51
52
|
const { store, message, router } = options
|
|
53
|
+
// 单页面通常是嵌入到v3的项目中,没有单独的清除按钮,所以需要清除indexedDB
|
|
54
|
+
indexedDB.clear()
|
|
52
55
|
if (
|
|
53
56
|
(!loginIgnore.includes(to) || to.name === '404') &&
|
|
54
57
|
!checkSingleAuthorization('SinglePage', token)
|
|
@@ -56,7 +59,7 @@ const loginGuard = (to, from, next, options) => {
|
|
|
56
59
|
localStorage.setItem('SinglePage_TOKEN', token)
|
|
57
60
|
startLogin({
|
|
58
61
|
...info,
|
|
59
|
-
pathname: window.location.pathname
|
|
62
|
+
pathname: window.location.pathname,
|
|
60
63
|
store,
|
|
61
64
|
router,
|
|
62
65
|
})
|
package/src/utils/login.js
CHANGED
|
@@ -111,7 +111,6 @@ function afterLogin (res, options) {
|
|
|
111
111
|
result.functions.unshift(resourceManageMain)
|
|
112
112
|
afterGeneral(result, options)
|
|
113
113
|
setAccessToken(data)
|
|
114
|
-
indexedDB.clear()
|
|
115
114
|
if (result.deps === '用户工单登记') {
|
|
116
115
|
router.push(setting.ticketPage).catch(() => {
|
|
117
116
|
})
|