dufeng 1 year ago
parent
commit
e38bb8e2bd
1 changed files with 6 additions and 2 deletions
  1. 6 2
      utils/constant.js

+ 6 - 2
utils/constant.js

@@ -8,14 +8,18 @@
 // 环境修改
 const ENV = 'dev'
 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 = {
-	dev: "http://tq.5000v.com:8032",
-	// dev: "http://tq.5000v.com:8025",
+	dev: window.location.protocol+'//'+server_url,
 	test: "",
 	prod: ""
 }
+
 /**
  * 前端页面配置(公众号重定向需要)
  */