Prechádzať zdrojové kódy

mod:换回 createWebHashHistory

panqiuyao 7 mesiacov pred
rodič
commit
d05e67e57b

+ 1 - 1
frontend/src/router/index.ts

@@ -74,7 +74,7 @@ const routes: RouteRecordRaw[] = [
 ];
 
 const router = createRouter({
-    history: createWebHistory(), // 修改: 将 createWebHistory 改为 createWebHashHistory
+    history: createWebHashHistory(), // 修改: 将 createWebHistory 改为 createWebHashHistory
     routes
 });
 

+ 1 - 2
frontend/src/utils/appfun.ts

@@ -8,6 +8,5 @@ export  function getFilePath (file_path){
 
 //获取路由地址
 export  function getRouterUrl (href){
-    return window.location.origin+href
+    return window.location.origin+window.location.pathname+href
 }
-