添加 vue-router 依赖并配置路由,重构登录组件,完善 HTTP 请求拦截器以支持 token 刷新机制

This commit is contained in:
zyh
2025-08-24 19:49:39 +08:00
parent 69bf5500cd
commit 17a1d4e85a
30 changed files with 2368 additions and 28 deletions

View File

@@ -1,8 +1,20 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'node:path'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
alias: { '@': path.resolve(__dirname, 'src') },
},
server: {
proxy: {
'/api': {
target: 'http://localhost:18080',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/api/, ''),
},
},
},
})