|
@@ -1,5 +1,6 @@
|
|
|
import store from "@/store/index.js";
|
|
|
import config from "@/common/config";
|
|
|
+import method from "@/common/methodTool";
|
|
|
var num = 1;
|
|
|
//接口api
|
|
|
// export const BASE_URL = 'https://api.xyyxt.net' //release
|
|
@@ -8,10 +9,7 @@ export const BASE_URL = config.BASE_URL;
|
|
|
export let tenantId = config.tenantId; // 祥粤云学堂:867735392558919680,祥粤学堂:667735392758919630, 中建云学堂-567735392758918520
|
|
|
// #endif
|
|
|
// #ifdef H5
|
|
|
-export const host =
|
|
|
- process.env.NODE_ENV === "production"
|
|
|
- ? window.location.host
|
|
|
- : "120.79.166.78:19012";
|
|
|
+export const host = setHost();
|
|
|
export let tenantId = uni.getStorageSync(host) || "";
|
|
|
// #endif
|
|
|
export const myRequest = (options) => {
|
|
@@ -160,3 +158,7 @@ function getTenantId() {
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
+function setHost() {
|
|
|
+ let host = window.location.host;
|
|
|
+ return method.checkDomain(host) ? host : "120.79.166.78:19012";
|
|
|
+}
|