diff --git a/.env.production b/.env.production index 0e279c2..68d03e3 100644 --- a/.env.production +++ b/.env.production @@ -1,6 +1,7 @@ # 开发默认走 Vite 代理 /api -> http://127.0.0.1:8001 VITE_API_BASE_URL=http://81.70.234.81:8001/api/v1 + # Tauri Rust 请求后端基址(拉取 appConfig、脚本等) AICLIENT_API_BASE=http://81.70.234.81:8001 diff --git a/src/router/index.js b/src/router/index.js index dec765f..52c7617 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,4 +1,4 @@ -import { createRouter, createWebHistory } from "vue-router"; +import { createRouter, createWebHashHistory } from "vue-router"; import { useAuthStore, ROLE_ADMIN, ROLE_AGENT,ROLE_OEM } from "../stores/auth"; @@ -368,7 +368,7 @@ const routes = [ path: "/:pathMatch(.*)*", - redirect: "/login", + redirect: { name: "login" }, }, @@ -378,7 +378,7 @@ const routes = [ const router = createRouter({ - history: createWebHistory(), + history: createWebHashHistory(), routes,