feat: 改成公网地址
This commit is contained in:
+1
-5
@@ -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
|
||||
|
||||
|
||||
+1
-1
@@ -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"
|
||||
|
||||
+1
-1
@@ -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')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user