修改:本地dev服务器地址更新

This commit is contained in:
马丁 2026-05-02 19:21:07 +08:00
parent 0f2c8d38e7
commit f8cebe64b3

View File

@ -35,5 +35,12 @@ export default defineConfig({
}, },
server: { server: {
host: true, host: true,
proxy: {
'/api': {
target: 'http://localhost:7777', // 测试服务器地址,可根据实际后端地址修改
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''), // 如果后端接口本身没有 /api 前缀,需要将其重写掉
},
},
}, },
}) })