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