fix: 修复由数据修改导致的重复请求问题
This commit is contained in:
@@ -48,8 +48,32 @@ router.beforeEach((to, from, next) => {
|
||||
store.commit('setButtonList', arr)
|
||||
store.commit('setRoleList', res.data.roles)
|
||||
bus.$emit('login')
|
||||
const path = []
|
||||
if (menuList) {
|
||||
menuList.forEach(e => {
|
||||
if (e.route) {
|
||||
path.push(e.route)
|
||||
} else {
|
||||
if (e.children) {
|
||||
e.children.forEach(e => {
|
||||
if (e.route) {
|
||||
path.push(e.route)
|
||||
} else {
|
||||
if (e.children) {
|
||||
e.children.forEach(e => {
|
||||
if (e.route) {
|
||||
path.push(e.route)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
router.push({
|
||||
path: menuList[0].children[0].route,
|
||||
path: path[0],
|
||||
query: {
|
||||
t: +new Date()
|
||||
}
|
||||
|
||||
@@ -86,8 +86,32 @@ const user = {
|
||||
store.commit('setButtonList', arr)
|
||||
store.commit('setRoleList', res.data.roles)
|
||||
bus.$emit('login')
|
||||
const path = []
|
||||
if (menuList) {
|
||||
menuList.forEach(e => {
|
||||
if (e.route) {
|
||||
path.push(e.route)
|
||||
} else {
|
||||
if (e.children) {
|
||||
e.children.forEach(e => {
|
||||
if (e.route) {
|
||||
path.push(e.route)
|
||||
} else {
|
||||
if (e.children) {
|
||||
e.children.forEach(e => {
|
||||
if (e.route) {
|
||||
path.push(e.route)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
router.push({
|
||||
path: menuList[0].children[0].route,
|
||||
path: path[0],
|
||||
query: {
|
||||
t: +new Date()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user