dufeng 1 rok temu
rodzic
commit
e38bb8e2bd
1 zmienionych plików z 6 dodań i 2 usunięć
  1. 6 2
      utils/constant.js

+ 6 - 2
utils/constant.js

@@ -8,14 +8,18 @@
 // 环境修改
 // 环境修改
 const ENV = 'dev'
 const ENV = 'dev'
 const BASE_URL = '/wf-api'
 const BASE_URL = '/wf-api'
+let server_url = window.location.host
+if(process.env.NODE_ENV === 'development'){
+    server_url = 'tq.5000v.com:8025'
+}
 
 
 // 后端多环境配置
 // 后端多环境配置
 const hostConfig = {
 const hostConfig = {
-	dev: "http://tq.5000v.com:8032",
-	// dev: "http://tq.5000v.com:8025",
+	dev: window.location.protocol+'//'+server_url,
 	test: "",
 	test: "",
 	prod: ""
 	prod: ""
 }
 }
+
 /**
 /**
  * 前端页面配置(公众号重定向需要)
  * 前端页面配置(公众号重定向需要)
  */
  */