This commit is contained in:
parent
496057ae5c
commit
f0af8c328e
Binary file not shown.
After Width: | Height: | Size: 83 KiB |
|
@ -17,15 +17,15 @@ const router = createRouter({
|
|||
path: "/guide",
|
||||
component: () => import("../view/guide.vue"),
|
||||
},
|
||||
{
|
||||
name: "权限",
|
||||
path: "/error/noPermission",
|
||||
component: () => import("../view/error/noPermission.vue"),
|
||||
},
|
||||
{
|
||||
path: "/home",
|
||||
component: () => import("../view/home.vue"),
|
||||
children: [
|
||||
// {
|
||||
// name: '登录',
|
||||
// path: '/login/index',
|
||||
// component: () => import('../view/login/LoginZZD.vue'),
|
||||
// },
|
||||
{
|
||||
name: "首页",
|
||||
path: "/home/index",
|
||||
|
@ -128,8 +128,6 @@ router.beforeEach((to, form, next) => {
|
|||
// }
|
||||
let type = tools.data.get("type");
|
||||
if (type) {
|
||||
console.log(1111);
|
||||
|
||||
next();
|
||||
} else {
|
||||
window.location.href = "http://localhost:8080/#/guide";
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
<template>
|
||||
<div class="error_main">
|
||||
<img class="error_main_img" src="@/assets/errorimg/error3.png" alt="" />
|
||||
<div class="error_main_content">账号没权限,请联系管理员</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<style lang="scss">
|
||||
.error_main {
|
||||
width: 100%;
|
||||
max-width: 500px;
|
||||
padding: 200px 30px 0;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
margin: 0 auto;
|
||||
|
||||
.error_main_img {
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
.error_main_content {
|
||||
text-align: center;
|
||||
margin-top: 5px;
|
||||
font-size: 14px;
|
||||
padding: 0 60px;
|
||||
box-sizing: border-box;
|
||||
color: #666874;
|
||||
font-weight: 500;
|
||||
margin-bottom: 26px;
|
||||
line-height: 48px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -176,11 +176,9 @@ const login = () => {
|
|||
// }
|
||||
tools.data.set("type", 1);
|
||||
} else {
|
||||
// 前往绑定
|
||||
this.loading = false;
|
||||
ElMessage.error({
|
||||
message: "请重新登录!",
|
||||
offset: 100,
|
||||
// 跳转未绑定页面
|
||||
router.push({
|
||||
path: `error/noPermission.vue`,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue