Fix redirect issue

This commit is contained in:
liangping 2021-10-15 16:15:59 +08:00
parent 145c9158c7
commit 9f44ccfbf0

View File

@ -333,10 +333,12 @@ router.beforeEach((to, from, next) => {
// const has = Object.keys(config).findIndex(i => i === c)
if (!config || Object.keys(config).findIndex(i => i === c) > -1) {
next()
} if (c === 'index.php') {
next({ name: 'home' })
} else if (c) {
next({ name: 'chain-404' })
if (c === 'index.php') {
next({ name: '/' })
} else {
next({ name: 'chain-404' })
}
} else {
next()
}