vue2-client 1.6.49-single → 1.6.50-single
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/router/async/router.map.js +73 -68
- package/src/router/guards.js +0 -3
package/package.json
CHANGED
|
@@ -1,68 +1,73 @@
|
|
|
1
|
-
const { homePage } = require(
|
|
2
|
-
// 视图组件
|
|
3
|
-
const view = {
|
|
4
|
-
tabs: () => import(
|
|
5
|
-
blank: () => import(
|
|
6
|
-
page: () => import(
|
|
7
|
-
}
|
|
8
|
-
// 动态路由对象定义
|
|
9
|
-
const routerResource = {}
|
|
10
|
-
// --------------------------------------基本视图组件--------------------------------------
|
|
11
|
-
// 空白视图
|
|
12
|
-
routerResource.blank = view.blank
|
|
13
|
-
// 单页面视图
|
|
14
|
-
routerResource.singlePage = view.blank
|
|
15
|
-
|
|
16
|
-
// --------------------------------------仪表盘--------------------------------------
|
|
17
|
-
routerResource.dashboard = view.blank
|
|
18
|
-
// 工作台
|
|
19
|
-
routerResource.workplace = () =>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
//
|
|
27
|
-
routerResource.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
//
|
|
35
|
-
routerResource.
|
|
36
|
-
|
|
37
|
-
//
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
name:
|
|
58
|
-
path:
|
|
59
|
-
component: () => import(
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
name:
|
|
63
|
-
path:
|
|
64
|
-
component: () => import(
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
1
|
+
const { homePage } = require("../../config");
|
|
2
|
+
// 视图组件
|
|
3
|
+
const view = {
|
|
4
|
+
tabs: () => import("@vue2-client/layouts/tabs"),
|
|
5
|
+
blank: () => import("@vue2-client/layouts/BlankView"),
|
|
6
|
+
page: () => import("@vue2-client/layouts/PageView"),
|
|
7
|
+
};
|
|
8
|
+
// 动态路由对象定义
|
|
9
|
+
const routerResource = {};
|
|
10
|
+
// --------------------------------------基本视图组件--------------------------------------
|
|
11
|
+
// 空白视图
|
|
12
|
+
routerResource.blank = view.blank;
|
|
13
|
+
// 单页面视图
|
|
14
|
+
routerResource.singlePage = view.blank;
|
|
15
|
+
|
|
16
|
+
// --------------------------------------仪表盘--------------------------------------
|
|
17
|
+
routerResource.dashboard = view.blank;
|
|
18
|
+
// 工作台
|
|
19
|
+
routerResource.workplace = () =>
|
|
20
|
+
import("@vue2-client/pages/dashboard/workplace");
|
|
21
|
+
// --------------------------------------系统配置--------------------------------------
|
|
22
|
+
routerResource.system = view.blank;
|
|
23
|
+
// 字典管理
|
|
24
|
+
routerResource.dictionaryManage = () =>
|
|
25
|
+
import("@vue2-client/pages/system/dictionary");
|
|
26
|
+
// 查询配置管理
|
|
27
|
+
routerResource.queryParamsManage = () =>
|
|
28
|
+
import("@vue2-client/pages/system/queryParams");
|
|
29
|
+
// 文件管理
|
|
30
|
+
routerResource.fileManager = () => import("@vue2-client/pages/system/file");
|
|
31
|
+
// 登录日志
|
|
32
|
+
routerResource.loginInfor = () =>
|
|
33
|
+
import("@vue2-client/pages/system/monitor/loginInfor");
|
|
34
|
+
// 操作日志
|
|
35
|
+
routerResource.operLog = () =>
|
|
36
|
+
import("@vue2-client/pages/system/monitor/operLog");
|
|
37
|
+
// 系统问题反馈工单
|
|
38
|
+
routerResource.submitTicket = () => import("@vue2-client/pages/system/ticket");
|
|
39
|
+
// 系统设置
|
|
40
|
+
routerResource.settings = () => import("@vue2-client/pages/system/settings");
|
|
41
|
+
|
|
42
|
+
// 基础路由组件注册
|
|
43
|
+
const routerMap = {
|
|
44
|
+
login: {
|
|
45
|
+
authority: "*",
|
|
46
|
+
path: "/login",
|
|
47
|
+
component: () => import("@vue2-client/pages/login"),
|
|
48
|
+
},
|
|
49
|
+
root: {
|
|
50
|
+
path: "/",
|
|
51
|
+
name: "首页",
|
|
52
|
+
redirect: homePage,
|
|
53
|
+
component: view.blank,
|
|
54
|
+
},
|
|
55
|
+
exp403: {
|
|
56
|
+
authority: "*",
|
|
57
|
+
name: "exp403",
|
|
58
|
+
path: "403",
|
|
59
|
+
component: () => import("@vue2-client/pages/exception/403"),
|
|
60
|
+
},
|
|
61
|
+
exp404: {
|
|
62
|
+
name: "exp404",
|
|
63
|
+
path: "404",
|
|
64
|
+
component: () => import("@vue2-client/pages/exception/404"),
|
|
65
|
+
},
|
|
66
|
+
exp500: {
|
|
67
|
+
name: "exp500",
|
|
68
|
+
path: "500",
|
|
69
|
+
component: () => import("@vue2-client/pages/exception/500"),
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
Object.assign(routerMap, routerResource);
|
|
73
|
+
export default routerMap;
|
package/src/router/guards.js
CHANGED
|
@@ -31,12 +31,10 @@ const progressStart = (to, from, next) => {
|
|
|
31
31
|
const loginGuard = (to, from, next, options) => {
|
|
32
32
|
const urlParams = new URLSearchParams(window.location.search);
|
|
33
33
|
const token = urlParams.get("token");
|
|
34
|
-
console.log(token);
|
|
35
34
|
if (token) {
|
|
36
35
|
const { AESDecrypt } = AES;
|
|
37
36
|
const info = AESDecrypt(token, "3KMKqvgwR8ULbR8Z");
|
|
38
37
|
const { store, message, router } = options;
|
|
39
|
-
console.log(AES, store);
|
|
40
38
|
if (
|
|
41
39
|
(!loginIgnore.includes(to) || to.name === "404") &&
|
|
42
40
|
!checkAuthorization()
|
|
@@ -50,7 +48,6 @@ const loginGuard = (to, from, next, options) => {
|
|
|
50
48
|
const roles = store.getters["account/roles"];
|
|
51
49
|
const user = localStorage.getItem(process.env.VUE_APP_USER_KEY);
|
|
52
50
|
const setUser = store._mutations["account/setUser"][0];
|
|
53
|
-
console.log("996", user);
|
|
54
51
|
setUser(user);
|
|
55
52
|
if (roles.length === 0 && !loginIgnore.includes(to)) {
|
|
56
53
|
message.warning("登录已失效,请重新登录");
|