feat: 前端基础设施更新 - API模块、路由、状态管理和工具类

- 新增 address/admin/favorite/review API 模块
- 更新已有 API 模块适配后端接口变更
- 新增 admin 类型定义和工具函数
- 添加静态资源文件
- 更新路由配置和守卫逻辑
- 更新 Vite 配置和依赖锁文件
This commit is contained in:
2026-03-10 23:21:17 +08:00
parent 9f1c5f837e
commit abba469a20
19 changed files with 1202 additions and 77 deletions

View File

@@ -2,7 +2,6 @@ import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
@@ -16,7 +15,19 @@ export default defineConfig({
'/api': {
target: 'http://localhost:8080',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '/api'),
rewrite: (proxyPath) => proxyPath.replace(/^\/api/, '/api'),
},
'/images': {
target: 'http://localhost:8080',
changeOrigin: true,
},
'/uploads': {
target: 'http://localhost:8080',
changeOrigin: true,
},
'/static': {
target: 'http://localhost:8080',
changeOrigin: true,
},
},
},
@@ -24,12 +35,12 @@ export default defineConfig({
rollupOptions: {
output: {
manualChunks: {
'vendor': ['vue', 'vue-router', 'pinia'],
'element': ['element-plus', '@element-plus/icons-vue'],
'utils': ['axios', 'dayjs', '@vueuse/core'],
'charts': ['echarts', 'vue-echarts'],
vendor: ['vue', 'vue-router', 'pinia'],
element: ['element-plus', '@element-plus/icons-vue'],
utils: ['axios', 'dayjs', '@vueuse/core'],
charts: ['echarts', 'vue-echarts'],
},
},
},
},
})
})