|
@@ -117,12 +117,15 @@ Vue.prototype.routerLoad = {
|
|
|
router.beforeEach((to, from, next) => {
|
|
|
if (localStorage.getItem("SC_token")) {
|
|
|
let menuList = window.sessionStorage.getItem("SC_listMuen")
|
|
|
+ JSON.parse
|
|
|
let newAr = [];
|
|
|
if (menuList == null || menuList == undefined) {
|
|
|
http.get('/sc-user-center/user/findUserMenu', { appId: '1002' }).then(({ status, data, msg }) => {
|
|
|
if (0 == status) {
|
|
|
let datas = data[0].children
|
|
|
window.sessionStorage.setItem('SC_listMuen', JSON.stringify(datas))
|
|
|
+ window.sessionStorage.setItem('setThisDetai', JSON.stringify(data[0]))
|
|
|
+ store.commit('setThisDetai', data[0]);
|
|
|
funcRouter(newAr, datas, router)
|
|
|
next({ ...to, replace: true })
|
|
|
} else {
|
|
@@ -134,7 +137,6 @@ router.beforeEach((to, from, next) => {
|
|
|
funcRouter(newAr, JSON.parse(menuList), router)
|
|
|
next({ ...to, replace: true })
|
|
|
} else {
|
|
|
- debugger;
|
|
|
let thisAll = JSON.parse(menuList)[0];
|
|
|
if (to.path == '/') {
|
|
|
if (!!thisAll.children) {
|