This commit is contained in:
parent
584700303b
commit
4008d2d301
|
@ -22,11 +22,13 @@ axios.interceptors.request.use(
|
||||||
// HTTP response 拦截器
|
// HTTP response 拦截器
|
||||||
axios.interceptors.response.use(
|
axios.interceptors.response.use(
|
||||||
(response) => {
|
(response) => {
|
||||||
|
// console.log(response,"响应拦截器成功")
|
||||||
return response;
|
return response;
|
||||||
},
|
},
|
||||||
(error) => {
|
(error) => {
|
||||||
if (error.response) {
|
if (error.response) {
|
||||||
if (error.response.status == 401) {
|
if (error.response.status == 401) {
|
||||||
|
// console.log(error.response,"响应拦截器失败")
|
||||||
ElMessage.error("请重新登录!");
|
ElMessage.error("请重新登录!");
|
||||||
// window.location.href = '/#/login?returnURL=' + window.location.href
|
// window.location.href = '/#/login?returnURL=' + window.location.href
|
||||||
window.location.href =
|
window.location.href =
|
||||||
|
|
|
@ -78,6 +78,9 @@ import png5 from "@/assets/guide/Dp/5.png";
|
||||||
import png6 from "@/assets/guide/Dp/6.png";
|
import png6 from "@/assets/guide/Dp/6.png";
|
||||||
import png7 from "@/assets/guide/Dp/7.png";
|
import png7 from "@/assets/guide/Dp/7.png";
|
||||||
import png8 from "@/assets/guide/Dp/8.png";
|
import png8 from "@/assets/guide/Dp/8.png";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
import tools from "@/utils/tools";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const routers = useRoute();
|
const routers = useRoute();
|
||||||
|
|
||||||
|
@ -134,6 +137,13 @@ const reset_font = () => {
|
||||||
"scale(" + width / 1920 + "," + height / 1080 + ")";
|
"scale(" + width / 1920 + "," + height / 1080 + ")";
|
||||||
};
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
let token = tools.data.get("token");
|
||||||
|
console.log(token, "token");
|
||||||
|
if (token == null) {
|
||||||
|
ElMessage.error("请重新登录!");
|
||||||
|
window.location.href =
|
||||||
|
"http://220.191.238.50:996/api/login?returnURL=" + window.location.href;
|
||||||
|
}
|
||||||
reset_font();
|
reset_font();
|
||||||
reset_font();
|
reset_font();
|
||||||
});
|
});
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<div class="menuBar">
|
<div class="menuBar">
|
||||||
<div class="tabPosition" v-for="(item, index) in data.tabPosition">
|
<div class="tabPosition" v-for="(item, index) in data.tabPosition">
|
||||||
<div class="tabPositionBox" @click="toggleVisibility(item)">
|
<div class="tabPositionBox" @click="toggleVisibility(item)">
|
||||||
<div style="display: flex;text-align: center;" >
|
<div style="display: flex; text-align: center">
|
||||||
<div class="img"><img :src="item.img" alt="" /></div>
|
<div class="img"><img :src="item.img" alt="" /></div>
|
||||||
<div class="tabsItem">
|
<div class="tabsItem">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
|
@ -143,7 +143,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive } from "vue";
|
import { ref, reactive, onMounted } from "vue";
|
||||||
import icon1 from "@/assets/sy-table/sy-table9.png";
|
import icon1 from "@/assets/sy-table/sy-table9.png";
|
||||||
import icon2 from "@/assets/sy-table/sy-table10.png";
|
import icon2 from "@/assets/sy-table/sy-table10.png";
|
||||||
import icon3 from "@/assets/sy-table/sy-table11.png";
|
import icon3 from "@/assets/sy-table/sy-table11.png";
|
||||||
|
@ -162,6 +162,19 @@ import Bj3 from "@/assets/sy-table/sy-table5.png";
|
||||||
import Bj4 from "@/assets/sy-table/sy-table6.png";
|
import Bj4 from "@/assets/sy-table/sy-table6.png";
|
||||||
|
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
import tools from "@/utils/tools";
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
let token = tools.data.get("token");
|
||||||
|
console.log(token, "token");
|
||||||
|
if (token == null) {
|
||||||
|
ElMessage.error("请重新登录!");
|
||||||
|
window.location.href =
|
||||||
|
"http://220.191.238.50:996/api/login?returnURL=" + window.location.href;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const routers = useRoute();
|
const routers = useRoute();
|
||||||
// 路由跳转
|
// 路由跳转
|
||||||
|
@ -549,11 +562,11 @@ const rowState = (row) => {
|
||||||
}
|
}
|
||||||
.tabPosition .img1 {
|
.tabPosition .img1 {
|
||||||
img {
|
img {
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 10px;
|
height: 10px;
|
||||||
margin-right: 24px;
|
margin-right: 24px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.tabPositionBox {
|
.tabPositionBox {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
@ -15,8 +15,8 @@ export default defineConfig({
|
||||||
// 第一个代理
|
// 第一个代理
|
||||||
"/api": {
|
"/api": {
|
||||||
// 匹配到啥来进行方向代理
|
// 匹配到啥来进行方向代理
|
||||||
target: "http://192.168.2.17:8095/", //刘进
|
// target: "http://192.168.2.17:8095/", //刘进
|
||||||
// target: "http://220.191.238.50:996/", //线上
|
target: "http://220.191.238.50:996/", //线上
|
||||||
changeOrigin: true, //是否支持跨域
|
changeOrigin: true, //是否支持跨域
|
||||||
//rewrite: (path) => path.replace(/^\/api/, '') // 如果不需要api 直接把路径上的api 替换成空,这个
|
//rewrite: (path) => path.replace(/^\/api/, '') // 如果不需要api 直接把路径上的api 替换成空,这个
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue