|
@@ -10,10 +10,10 @@ if (process.env.VUE_APP_SELF_DEFINE_DOMAIN === "true") {
|
|
|
if (!domain) {
|
|
|
const ipFormat = new RegExp(/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/);
|
|
|
const hostname = window.location.hostname;
|
|
|
- if (ipFormat.test(hostname)) {
|
|
|
- domain =
|
|
|
- parseHrefParam(window.location.href, "code") ||
|
|
|
- window.sessionStorage.getItem("ipDomainCode");
|
|
|
+ const paramCode = parseHrefParam(window.location.href, "code");
|
|
|
+
|
|
|
+ if (ipFormat.test(hostname) || paramCode) {
|
|
|
+ domain = paramCode || window.sessionStorage.getItem("ipDomainCode");
|
|
|
if (domain) {
|
|
|
window.sessionStorage.setItem("ipDomainCode", domain);
|
|
|
}
|
|
@@ -21,6 +21,7 @@ if (!domain) {
|
|
|
domain = hostname.split(".")[0];
|
|
|
}
|
|
|
}
|
|
|
+console.log(domain);
|
|
|
export const ORG_CODE = domain;
|
|
|
|
|
|
const ADMIN_CODE = "admin";
|