diff --git a/src/pages/user/store/login.ts b/src/pages/user/store/login.ts index 78585bd..bbb175e 100644 --- a/src/pages/user/store/login.ts +++ b/src/pages/user/store/login.ts @@ -71,7 +71,7 @@ export const useLoginStore = create((set, get) => { if (redirect) { window.location.href = redirect; } else { - window.location.href = basename; + window.location.href = basename ? basename + '/' : '/'; } } else { message.error(res.message || 'Request failed'); diff --git a/vite.config.ts b/vite.config.ts index f454115..2e33150 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -66,12 +66,12 @@ export default defineConfig({ changeOrigin: true, }, '/api': { - target: 'http://localhost:4002', + target: 'http://localhost:4005', changeOrigin: true, rewrite: (path) => path.replace(/^\/api/, '/api'), }, '/api/router': { - target: 'ws://localhost:4002', + target: 'ws://localhost:4005', changeOrigin: true, ws: true, rewriteWsOrigin: true,