Browse Source

开发环境自定义domain

Michael Wang 4 years ago
parent
commit
38c4bfed31
2 changed files with 2 additions and 1 deletions
  1. 1 0
      .env.development
  2. 1 1
      src/constants/constants.js

+ 1 - 0
.env.development

@@ -4,4 +4,5 @@ VUE_APP_CONFIG_FILE_SEVER_URL=https://ecs-test-static.qmth.com.cn
 VUE_APP_ROUTER_PATH=/oe-web/
 VUE_APP_PUBLIC_PATH=/oe-web/
 VUE_APP_SLS_STORE_NAME=student-client-test
+VUE_APP_SELF_DEFINE_DOMAIN=true
 VUE_APP_GIT_REPO_VERSION=TO_BE_OVERRIDED

+ 1 - 1
src/constants/constants.js

@@ -35,7 +35,7 @@ export const CUG_DOMAIN = "cug.ecs.qmth.com.cn";
 // export const CUG_DOMAIN = "ecs-test.qmth.com.cn";
 
 let domain;
-if (process.env.NODE_ENV !== "production") {
+if (process.env.VUE_APP_SELF_DEFINE_DOMAIN === "true") {
   domain = window.localStorage.getItem("domain_in_url");
 }
 if (!domain) domain = window.location.hostname.split(".")[0];