Ver Fonte

shengmu:云养牛上传更新

baishaojie há 1 mês atrás
pai
commit
db8bf46f8d
3 ficheiros alterados com 5 adições e 5 exclusões
  1. 1 1
      .env.development
  2. 2 2
      .env.production
  3. 2 2
      src/utils/request.js

+ 1 - 1
.env.development

@@ -9,7 +9,7 @@ ENV = 'development'
 #VUE_APP_BASE_API = 'http://kpttest.kptyun.com/'
 
 # 线上
-VUE_APP_BASE_API = 'http://127.0.0.1:8081/'
+VUE_APP_BASE_API = 'http://127.0.0.1/'
 
 线上
 #VUE_APP_BASE_API = 'http://127.0.0.1:8081/'

+ 2 - 2
.env.production

@@ -3,7 +3,7 @@ ENV = 'production'
 
 # base api
 # 正式线
-VUE_APP_BASE_API = ':8081/'
+# VUE_APP_BASE_API = ':8081/'
 # VUE_APP_BASE_API = 'http://192.168.1.70:8088/'
 # VUE_APP_BASE_API = 'http://127.0.0.1:8081/'
-# VUE_APP_BASE_API = '/'
+VUE_APP_BASE_API = '/'

+ 2 - 2
src/utils/request.js

@@ -15,8 +15,8 @@ var reg = /(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)\.(25[0-5]|2[0-4]\d|[0-1]\d{2}|
 var browserUrl = window.location.hostname
 console.log("========url===", reg.test(browserUrl))
 if (reg.test(browserUrl)) {
-    // URL = window.location.protocol +"//"+ browserUrl + ":8082"
-    URL = window.location.protocol + "//" + browserUrl + ":80/"
+    URL = window.location.protocol + "//" + browserUrl + ":8082/"
+        // URL = window.location.protocol + "//" + browserUrl + ":80/"
 }
 
 Cookies.set("url", URL);