Commit 8ec91a09 authored by Cai Wei's avatar Cai Wei

fix(*): 跳转及样式问题处理

parent 0aed5fca
...@@ -283,7 +283,7 @@ export default { ...@@ -283,7 +283,7 @@ export default {
</style> </style>
<style> <style>
.el-breadcrumb__inner { .el-breadcrumb__inner {
color: #000; color: #848383 !important;
font-weight: 600; font-weight: 600;
} }
......
...@@ -6,6 +6,8 @@ import { getToken, clearAllCookies, removeToken } from "@/utils/auth"; ...@@ -6,6 +6,8 @@ import { getToken, clearAllCookies, removeToken } from "@/utils/auth";
const ENV = import.meta.env const ENV = import.meta.env
const requestObj = {}; const requestObj = {};
// 添加一个标志位,用于记录是否已经显示了登录过期的消息
let isLoginExpiredMessageShown = false;
const source = axios.CancelToken.source() const source = axios.CancelToken.source()
const service = axios.create({ const service = axios.create({
...@@ -65,7 +67,20 @@ service.interceptors.response.use( ...@@ -65,7 +67,20 @@ service.interceptors.response.use(
if (res.code !== 1) { if (res.code !== 1) {
if (res.code === 1001) { if (res.code === 1001) {
removeToken("dataBranchFactoryId"); removeToken("dataBranchFactoryId");
// router.push(`login`); // 检查是否已经显示过登录过期的消息
if (!isLoginExpiredMessageShown) {
ElMessage({
message: "登录已过期,请重新登录",
type: "error",
duration: 2 * 1000
});
isLoginExpiredMessageShown = true;
// 设置一个定时器,在一段时间后重置标志位,以便下次可以再次显示
setTimeout(() => {
isLoginExpiredMessageShown = false;
}, 3000);
}
router.push(`login`);
} else { } else {
if (!res.success) { if (!res.success) {
if (res.code === 9000) { if (res.code === 9000) {
......
...@@ -96,7 +96,7 @@ select:-webkit-autofill { ...@@ -96,7 +96,7 @@ select:-webkit-autofill {
.el-breadcrumb__item:last-child .el-breadcrumb__inner { .el-breadcrumb__item:last-child .el-breadcrumb__inner {
color: #ccc !important; color: #ccc !important;
padding-left: 16px; padding-left: 4px;
} }
.el-progress-bar__outer { .el-progress-bar__outer {
......
...@@ -18,8 +18,8 @@ const router = useRouter(); ...@@ -18,8 +18,8 @@ const router = useRouter();
const iframeRef = ref(null); const iframeRef = ref(null);
const url = `http://172.16.20.227/admin/ecoTom/#/robotNew?token=${getToken("TOKEN")}` // const url = `http://172.16.20.227/admin/ecoTom/#/robotNew?token=${getToken("TOKEN")}`
// const url = `https://screen.bmetech.com/steelmakingScreen/#/robotNew?token=${getToken("TOKEN")}` const url = `https://screen.bmetech.com/steelmakingScreen/#/robotNew`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment