feat: 改成公网地址

This commit is contained in:
王天骄
2026-06-01 17:21:34 +08:00
parent e5470f9f62
commit a521c1c4cb
3 changed files with 3 additions and 7 deletions
+1 -5
View File
@@ -1,8 +1,4 @@
let apiBaseUrl = 'http://192.168.2.76:8000/api' const apiBaseUrl = 'http://127.0.0.1:8000/api'
// #ifdef H5
apiBaseUrl = '/backend-api'
// #endif
export const API_BASE_URL = apiBaseUrl export const API_BASE_URL = apiBaseUrl
+1 -1
View File
@@ -72,7 +72,7 @@
"devServer" : { "devServer" : {
"proxy" : { "proxy" : {
"/backend-api" : { "/backend-api" : {
"target" : "http://192.168.2.76:8000", "target" : "http://127.0.0.1:8000",
"changeOrigin" : true, "changeOrigin" : true,
"pathRewrite" : { "pathRewrite" : {
"^/backend-api" : "/api" "^/backend-api" : "/api"
+1 -1
View File
@@ -6,7 +6,7 @@ export default defineConfig({
server: { server: {
proxy: { proxy: {
'/backend-api': { '/backend-api': {
target: 'http://192.168.2.76:8000', target: 'http://127.0.0.1:8000',
changeOrigin: true, changeOrigin: true,
rewrite: path => path.replace(/^\/backend-api/, '/api') rewrite: path => path.replace(/^\/backend-api/, '/api')
} }