|
|
@@ -1,4 +1,4 @@
|
|
|
-import {createRouter, createWebHashHistory} from 'vue-router'
|
|
|
+import {createRouter, createWebHistory} from 'vue-router'
|
|
|
import {CONFIG, refreshRoleRoute} from "@/utils/roleUtils.js";
|
|
|
import {Message} from "@/utils/message/Message.js";
|
|
|
import {refreshAllDictData} from "@/utils/dictUtils.js";
|
|
|
@@ -240,14 +240,14 @@ const loginToHomeMap = {
|
|
|
}
|
|
|
|
|
|
const router = createRouter({
|
|
|
- history: createWebHashHistory(),
|
|
|
+ history: createWebHistory(),
|
|
|
routes
|
|
|
})
|
|
|
|
|
|
// 导航守卫
|
|
|
router.beforeEach(async (to, from, next) => {
|
|
|
// 注册页面始终允许访问,不需要登录状态
|
|
|
- if ( ['/register-login', '/blockly-register'].includes(to.path)) {
|
|
|
+ if ( ['/register-login', '/register'].includes(to.path)) {
|
|
|
next()
|
|
|
return
|
|
|
}
|