fix: 后退前进功能

This commit is contained in:
chenjinsong
2022-10-09 18:47:09 +08:00
parent 313591a5ef
commit 705bc0d58d
11 changed files with 42 additions and 96 deletions

View File

@@ -2,7 +2,7 @@ import router from './router'
import store from './store'
import { ElMessage } from 'element-plus'
import { getPermission } from '@/utils/api'
import { loadGeoData, setHistory } from '@/utils/tools'
import { loadGeoData } from '@/utils/tools'
import axios from 'axios'
import { storageKey } from '@/utils/constants'
import { loadI18n } from '@/i18n'
@@ -27,7 +27,6 @@ router.beforeEach(async (to, from, next) => {
}
// 加载权限
if (permissionWhiteList.indexOf(to.path) !== -1) {
setHistory(to)
next()
} else {
if (store.getters.menuList.length === 0) {
@@ -38,7 +37,6 @@ router.beforeEach(async (to, from, next) => {
}
if (to.path) {
if (hasMenu(store.getters.menuList, to.path)) {
setHistory(to)
next()
} else {
ElMessage.error('No access') // TODO 国际化