This commit is contained in:
parent
8385634bd8
commit
c56d90ecfa
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
|
@ -17,10 +17,22 @@ const router = createRouter({
|
||||||
component: () => import("../view/guide.vue"),
|
component: () => import("../view/guide.vue"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "权限",
|
name: "无权限",
|
||||||
path: "/error/noPermission",
|
path: "/error/noPermission",
|
||||||
component: () => import("../view/error/noPermission.vue"),
|
component: () => import("../view/error/noPermission.vue"),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "404",
|
||||||
|
path: "/404",
|
||||||
|
component: () => import("../views/error/404.vue"),
|
||||||
|
meta: { page_id: 7, page_name: "404" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "500",
|
||||||
|
path: "/500",
|
||||||
|
component: () => import("../views/error/500.vue"),
|
||||||
|
meta: { page_id: 8, page_name: "500" },
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: "/home",
|
path: "/home",
|
||||||
component: () => import("../view/home.vue"),
|
component: () => import("../view/home.vue"),
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import tools from "@/utils/tools";
|
import tools from "@/utils/tools";
|
||||||
|
|
||||||
import dd from "gdt-jsapi";
|
|
||||||
import router from "../router";
|
import router from "../router";
|
||||||
|
|
||||||
// axios.defaults.baseURL = '/api'
|
// axios.defaults.baseURL = '/api'
|
||||||
axios.defaults.timeout = 120000;
|
axios.defaults.timeout = 120000;
|
||||||
|
|
||||||
|
@ -31,31 +30,27 @@ axios.interceptors.response.use(
|
||||||
if (error.response) {
|
if (error.response) {
|
||||||
if (error.response.status == 401) {
|
if (error.response.status == 401) {
|
||||||
ElMessage.error("请重新登录!");
|
ElMessage.error("请重新登录!");
|
||||||
// console.log(error.response,"响应拦截器失败")
|
|
||||||
// window.location.href = '/#/login?returnURL=' + window.location.href
|
|
||||||
// window.location.href =
|
|
||||||
// "http://220.191.238.50:996/api/login?returnURL=" +
|
|
||||||
// window.location.href;
|
|
||||||
|
|
||||||
// const cookies = document.cookie.split(";");
|
|
||||||
// for (let i = 0; i < cookies.length; i++) {
|
|
||||||
// const cookie = cookies[i];
|
|
||||||
// const eqPos = cookie.indexOf("=");
|
|
||||||
// const name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
|
|
||||||
// document.cookie =
|
|
||||||
// name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/;";
|
|
||||||
// }
|
|
||||||
|
|
||||||
router.replace({
|
router.replace({
|
||||||
path: "/guide",
|
path: "/guide",
|
||||||
});
|
});
|
||||||
|
} else if (error.response.status == 403) {
|
||||||
|
ElMessage.error("Status:403,资源不可用!");
|
||||||
|
router.replace({
|
||||||
|
path: "/403",
|
||||||
|
});
|
||||||
} else if (error.response.status == 404) {
|
} else if (error.response.status == 404) {
|
||||||
ElMessage.error("Status:404,正在请求不存在的服务器记录!");
|
ElMessage.error("Status:404,正在请求不存在的服务器记录!");
|
||||||
|
router.replace({
|
||||||
|
path: "/404",
|
||||||
|
});
|
||||||
} else if (error.response.status == 500) {
|
} else if (error.response.status == 500) {
|
||||||
ElMessage.error({
|
ElMessage.error({
|
||||||
title: "请求错误",
|
title: "请求错误",
|
||||||
message: "Status:500,服务器发生错误!",
|
message: "Status:500,服务器发生错误!",
|
||||||
});
|
});
|
||||||
|
router.replace({
|
||||||
|
path: "/500",
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
ElMessage.error(`Status:${error.response.status},未知错误!`);
|
ElMessage.error(`Status:${error.response.status},未知错误!`);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,85 @@
|
||||||
|
<template>
|
||||||
|
<div class="error_main">
|
||||||
|
<img class="error_main_img" src="@/assets/errorImg/error3.png" alt="" />
|
||||||
|
<div class="error_main_content">请求未验证,请联系管理员</div>
|
||||||
|
<div class="unit">
|
||||||
|
<div>
|
||||||
|
<!-- 应用归属单位 -->
|
||||||
|
应用归属单位
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<!-- 象山县委宣传部 -->
|
||||||
|
象山县城市建设投资集团有限公司
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="unit">
|
||||||
|
<div>
|
||||||
|
<!-- 应用管理员 -->
|
||||||
|
应用管理员
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<!-- 陈金裕 -->
|
||||||
|
姚杰
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="unit">
|
||||||
|
<div>
|
||||||
|
<!-- 联系方式 -->
|
||||||
|
联系方式
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<!-- 13806654654 -->
|
||||||
|
15888067199
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<style lang="scss">
|
||||||
|
.error_main {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 500px;
|
||||||
|
padding: 30px 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.unit {
|
||||||
|
display: flex;
|
||||||
|
// padding: 16px;
|
||||||
|
height: 58px;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 14px;
|
||||||
|
justify-content: space-between;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #666874;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
div:nth-child(2) {
|
||||||
|
color: #32333b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -0,0 +1,87 @@
|
||||||
|
<template>
|
||||||
|
<div class="error_main">
|
||||||
|
<img class="error_main_img" src="@/assets/errorImg/error3.png" alt="" />
|
||||||
|
<div class="error_main_content">
|
||||||
|
抱歉,您暂无当前页面的访问权限,请联系管理员
|
||||||
|
</div>
|
||||||
|
<div class="unit">
|
||||||
|
<div>
|
||||||
|
<!-- 应用归属单位 -->
|
||||||
|
应用归属单位
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<!-- 象山县委宣传部 -->
|
||||||
|
象山县城市建设投资集团有限公司
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="unit">
|
||||||
|
<div>
|
||||||
|
<!-- 应用管理员 -->
|
||||||
|
应用管理员
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<!-- 陈金裕 -->
|
||||||
|
姚杰
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="unit">
|
||||||
|
<div>
|
||||||
|
<!-- 联系方式 -->
|
||||||
|
联系方式
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<!-- 13806654654 -->
|
||||||
|
15888067199
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<style lang="scss">
|
||||||
|
.error_main {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 500px;
|
||||||
|
padding: 30px 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.unit {
|
||||||
|
display: flex;
|
||||||
|
// padding: 16px;
|
||||||
|
height: 58px;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 14px;
|
||||||
|
justify-content: space-between;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #666874;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
div:nth-child(2) {
|
||||||
|
color: #32333b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -0,0 +1,55 @@
|
||||||
|
<template>
|
||||||
|
<div class="error_main">
|
||||||
|
<img class="error_main_img" src="@/assets/errorImg/error1.png" alt="" />
|
||||||
|
<div class="error_main_content">抱歉,访问资源不存在</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<style lang="scss">
|
||||||
|
.error_main {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 500px;
|
||||||
|
padding: 30px 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.unit {
|
||||||
|
display: flex;
|
||||||
|
// padding: 16px;
|
||||||
|
height: 58px;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 14px;
|
||||||
|
justify-content: space-between;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #666874;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
div:nth-child(2) {
|
||||||
|
color: #32333b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
<template>
|
||||||
|
<div class="error_main">
|
||||||
|
<img class="error_main_img" src="@/assets/errorImg/error2.png" alt="" />
|
||||||
|
<div class="error_main_content">
|
||||||
|
抱歉,系统错误,您可以选择尝试清除缓存或联系管理员
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<style lang="scss">
|
||||||
|
.error_main {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 500px;
|
||||||
|
padding: 30px 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.unit {
|
||||||
|
display: flex;
|
||||||
|
// padding: 16px;
|
||||||
|
height: 58px;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 14px;
|
||||||
|
justify-content: space-between;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #666874;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
div:nth-child(2) {
|
||||||
|
color: #32333b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="error_main">
|
<div class="error_main">
|
||||||
<img class="error_main_img" src="@/assets/errorimg/error3.png" alt="" />
|
<img class="error_main_img" src="@/assets/errorImg/error3.png" alt="" />
|
||||||
<div class="error_main_content">账号没权限,请联系管理员</div>
|
<div class="error_main_content">账号没权限,请联系管理员</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -159,10 +159,11 @@ const login = () => {
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
|
// var token = getCookie("lytoken");
|
||||||
var token = getCookie("lytoken");
|
var token = '6b0e380b4a8f46baae4923f83faf670d';
|
||||||
|
router.push({
|
||||||
// var token = '6b0e380b4a8f46baae4923f83faf670d';
|
path: `/error/noPermission`,
|
||||||
|
});
|
||||||
// console.log('token', token)
|
// console.log('token', token)
|
||||||
if (!token) {
|
if (!token) {
|
||||||
window.location.href =
|
window.location.href =
|
||||||
|
|
Loading…
Reference in New Issue