update:通过代理转发接口api

This commit is contained in:
hrz
2025-04-14 21:53:52 +08:00
parent 703ecfae40
commit 03d89d22ec
2 changed files with 5 additions and 4 deletions
+1 -4
View File
@@ -1,4 +1 @@
# 暂时使用群主的接口
# VUE_APP_API_BASE_URL=https://2662r3426b.vicp.fun/xiaozhi
# 如果本地开发,请使用以下接口
VUE_APP_API_BASE_URL=http://localhost:8002/xiaozhi
VUE_APP_API_BASE_URL=/xiaozhi
+4
View File
@@ -15,6 +15,10 @@ module.exports = defineConfig({
devServer: {
port: 8001, // 指定端口为 8001
proxy: {
'/xiaozhi': {
target: 'http://127.0.0.1:8002',
changeOrigin: true
}
},
client: {
overlay: false, // 不显示 webpack 错误覆盖层