imatrix-ui 0.2.45-up → 0.2.46-up
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/permission.js
CHANGED
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
getUsername,
|
|
4
4
|
removeAllLanguages,
|
|
5
5
|
removeCurrentUser,
|
|
6
|
+
removeDevpPermissions,
|
|
6
7
|
removeLanguage,
|
|
7
8
|
removePublishControl,
|
|
8
9
|
removeToken,
|
|
@@ -204,6 +205,7 @@ const user = {
|
|
|
204
205
|
|
|
205
206
|
removeMenus()
|
|
206
207
|
removePublishControl()
|
|
208
|
+
removeDevpPermissions()
|
|
207
209
|
resolve(data)
|
|
208
210
|
})
|
|
209
211
|
.catch((error) => {
|
|
@@ -227,6 +229,8 @@ const user = {
|
|
|
227
229
|
removePermissions()
|
|
228
230
|
|
|
229
231
|
removeMenus()
|
|
232
|
+
removePublishControl()
|
|
233
|
+
removeDevpPermissions()
|
|
230
234
|
|
|
231
235
|
resolve()
|
|
232
236
|
})
|
package/src/utils/auth.js
CHANGED
|
@@ -87,3 +87,12 @@ export function removeAllLanguages() {
|
|
|
87
87
|
export function removePublishControl() {
|
|
88
88
|
authApi.removePublishControl()
|
|
89
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* 清除开发平台的缓存信息
|
|
92
|
+
*/
|
|
93
|
+
export function removeDevpPermissions() {
|
|
94
|
+
let devpJWTKey = '_devpJWT'
|
|
95
|
+
let currentRoleKey = '_CURRENT_ROLE'
|
|
96
|
+
authApi.removeSessionCache(devpJWTKey)
|
|
97
|
+
authApi.removeSessionCache(currentRoleKey)
|
|
98
|
+
}
|
|
@@ -104,46 +104,41 @@ export default {
|
|
|
104
104
|
},
|
|
105
105
|
toPath(menu) {
|
|
106
106
|
const toPathObj = {};
|
|
107
|
-
let routePath = menu.fullPath;
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
routePath += "?"
|
|
107
|
+
let routePath = menu.fullPath;
|
|
108
|
+
toPathObj.openWay = menu.openWay;
|
|
109
|
+
if (this.isExternalLink(menu.pageType)) {
|
|
110
|
+
if (this.platFrontUrl) {
|
|
111
|
+
if (routePath && routePath.indexOf("?") > 0) {
|
|
112
|
+
routePath += "&"
|
|
113
|
+
} else {
|
|
114
|
+
routePath += "?"
|
|
115
|
+
}
|
|
116
|
+
routePath = routePath + this.platFrontUrl;
|
|
118
117
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
routePath
|
|
118
|
+
if (this.platBackendUrl) {
|
|
119
|
+
if (routePath && routePath.indexOf("?") > 0) {
|
|
120
|
+
routePath += "&"
|
|
121
|
+
} else {
|
|
122
|
+
routePath += "?"
|
|
123
|
+
}
|
|
124
|
+
routePath = routePath + this.platBackendUrl;
|
|
126
125
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
routePath
|
|
126
|
+
if (this.devpJWT) {
|
|
127
|
+
if (routePath && routePath.indexOf("?") > 0) {
|
|
128
|
+
routePath += "&"
|
|
129
|
+
} else {
|
|
130
|
+
routePath += "?"
|
|
131
|
+
}
|
|
132
|
+
routePath = routePath + this.devpJWT
|
|
134
133
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
routePath
|
|
134
|
+
if (this.currentRole) {
|
|
135
|
+
if (routePath && routePath.indexOf("?") > 0) {
|
|
136
|
+
routePath += "&"
|
|
137
|
+
} else {
|
|
138
|
+
routePath += "?"
|
|
139
|
+
}
|
|
140
|
+
routePath = routePath + this.currentRole
|
|
142
141
|
}
|
|
143
|
-
routePath = routePath + this.currentRole
|
|
144
|
-
}
|
|
145
|
-
toPathObj.openWay = menu.openWay;
|
|
146
|
-
if (this.isExternalLink(menu.pageType)) {
|
|
147
142
|
toPathObj.path = "/tab-content-iframe-index"
|
|
148
143
|
toPathObj.tabPath = "/iframe-page/page"
|
|
149
144
|
toPathObj.query = {};
|