xiaohaizhao 1 year ago
parent
commit
f1843c8cf0
1 changed files with 8 additions and 3 deletions
  1. 8 3
      utils/Http.js

+ 8 - 3
utils/Http.js

@@ -1,8 +1,13 @@
 class HTTP {
 	constructor() {
-		// this.baseUrl = "http://61.164.207.46:8000";
-		// this.baseUrl = "https://lsa.cnyunl.com";
-		this.baseUrl = "http://61.164.207.46:8300";
+		let ENV = wx.getAccountInfoSync().miniProgram.envVersion;
+		if (ENV === 'release') { // 正式版
+			this.baseUrl = "https://lsa.cnyunl.com";
+		} else {
+			// this.baseUrl = "https://lsa.cnyunl.com";
+			this.baseUrl = "http://61.164.207.46:8300";
+		}
+		console.log("接口地址:", this.baseUrl)
 	}
 	request({
 		url,