diff --git a/api/auth.ts b/api/auth.ts index 877bd2b..65920a5 100644 --- a/api/auth.ts +++ b/api/auth.ts @@ -1,8 +1,4 @@ -let apiBaseUrl = 'http://192.168.2.76:8000/api' - -// #ifdef H5 -apiBaseUrl = '/backend-api' -// #endif +const apiBaseUrl = 'http://127.0.0.1:8000/api' export const API_BASE_URL = apiBaseUrl diff --git a/manifest.json b/manifest.json index 4d1491d..bba0c34 100644 --- a/manifest.json +++ b/manifest.json @@ -72,7 +72,7 @@ "devServer" : { "proxy" : { "/backend-api" : { - "target" : "http://192.168.2.76:8000", + "target" : "http://127.0.0.1:8000", "changeOrigin" : true, "pathRewrite" : { "^/backend-api" : "/api" diff --git a/vite.config.ts b/vite.config.ts index 217d89d..29a6bdc 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -6,7 +6,7 @@ export default defineConfig({ server: { proxy: { '/backend-api': { - target: 'http://192.168.2.76:8000', + target: 'http://127.0.0.1:8000', changeOrigin: true, rewrite: path => path.replace(/^\/backend-api/, '/api') }