Browse Source

导航接入接口数据

master
pengda 20 hours ago
parent
commit
e7ce53bbd4
  1. 6
      src/App.vue
  2. 2
      src/router/index.js

6
src/App.vue

@ -36,7 +36,7 @@ import Breadcrumb from './components/Breadcrumb.vue';
// import loadingAnimation from '@/assets/loadingAni.json' // JSON // import loadingAnimation from '@/assets/loadingAni.json' // JSON
import GlobalLoading from '@/components/GlobalLoading1.vue' import GlobalLoading from '@/components/GlobalLoading1.vue'
import SliderScondThree from '@/components/SliderScondThree.vue' import SliderScondThree from '@/components/SliderScondThree.vue'
import store from "@/store"; // import store from "@/store";
// import ContentWithLoading from '@/components/ContentWithLoading' // import ContentWithLoading from '@/components/ContentWithLoading'
export default { export default {
data() { data() {
@ -58,8 +58,8 @@ export default {
}, },
mounted() { mounted() {
window.addEventListener('beforeunload', this.clearStorage); window.addEventListener('beforeunload', this.clearStorage);
const menu_list = JSON.parse(localStorage.getItem('menu_list')) // const menu_list = JSON.parse(localStorage.getItem('menu_list'))
store.commit('SET_SLIDER_MENU', menu_list); // store.commit('SET_SLIDER_MENU', menu_list);
console.log(this.secondMenu,'secondMenu===='); console.log(this.secondMenu,'secondMenu====');
}, },
beforeUnmount() { beforeUnmount() {

2
src/router/index.js

@ -562,7 +562,7 @@ router.beforeEach((to, from, next) => {
first_child_router.forEach(item => { first_child_router.forEach(item => {
if (item.path === to.path) { if (item.path === to.path) {
store.commit('SET_CUSTOMIZE', false); store.commit('SET_CUSTOMIZE', false);
// store.commit('SET_SLIDER_MENU', 'menuData'); store.commit('SET_SLIDER_MENU', 'menuData');
} }
}) })
} }

Loading…
Cancel
Save