From 8c9d5cf4d35396c59d113cbedb2d29bd65da9711 Mon Sep 17 00:00:00 2001 From: pengda <1111@qq.com> Date: Tue, 2 Sep 2025 14:00:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E8=88=AA=E5=85=BC=E5=AE=B9bug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 8 +++++--- src/components/SliderMenu.vue | 1 + src/router/index.js | 2 +- src/utils/request.js | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/App.vue b/src/App.vue index 662c818..8bb3492 100755 --- a/src/App.vue +++ b/src/App.vue @@ -36,7 +36,7 @@ import Breadcrumb from './components/Breadcrumb.vue'; // import loadingAnimation from '@/assets/loadingAni.json' // 导入JSON文件 import GlobalLoading from '@/components/GlobalLoading1.vue' import SliderScondThree from '@/components/SliderScondThree.vue' -// import store from "@/store"; +import store from "@/store"; // import ContentWithLoading from '@/components/ContentWithLoading' export default { data() { @@ -58,8 +58,10 @@ export default { }, mounted() { window.addEventListener('beforeunload', this.clearStorage); - // const menu_list = JSON.parse(localStorage.getItem('menu_list')) - // store.commit('SET_SLIDER_MENU', menu_list); + if(this.$route.path.includes('/agent/')){ + const menu_list = JSON.parse(localStorage.getItem('menu_list')) + store.commit('SET_SLIDER_MENU', menu_list); + } console.log(this.secondMenu,'secondMenu===='); }, beforeUnmount() { diff --git a/src/components/SliderMenu.vue b/src/components/SliderMenu.vue index 31a795b..09fe0cc 100644 --- a/src/components/SliderMenu.vue +++ b/src/components/SliderMenu.vue @@ -96,6 +96,7 @@ export default { methods: { // 获取站点列表 getSiteNo() { + if(this.customize)return const that = this that.$http('POST', '/agentnew/ajax_get_site_no', { }).then(response => { diff --git a/src/router/index.js b/src/router/index.js index 900373b..23dffc5 100755 --- a/src/router/index.js +++ b/src/router/index.js @@ -562,7 +562,7 @@ router.beforeEach((to, from, next) => { first_child_router.forEach(item => { if (item.path === to.path) { store.commit('SET_CUSTOMIZE', false); - store.commit('SET_SLIDER_MENU', 'menuData'); + // store.commit('SET_SLIDER_MENU', 'menuData'); } }) } diff --git a/src/utils/request.js b/src/utils/request.js index 2d81420..67017ac 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -52,7 +52,7 @@ service.interceptors.response.use( switch (error.response.status) { case 401: // 未授权,跳转到登录页 - window.location.href = process.env.VUE_APP_HOST; + // window.location.href = process.env.VUE_APP_HOST; break; case 402: // token失效