Browse Source

docker: env8

Yi 1 year ago
parent
commit
1a47df8af0
2 changed files with 3 additions and 3 deletions
  1. 2 2
      src/main.js
  2. 1 1
      src/utils/request.js

+ 2 - 2
src/main.js

@@ -96,7 +96,7 @@ const DOMAIN = document.querySelector("html").getAttribute("domain");
 // 获取html标签的domain属性值
 if (DOMAIN) {
   console.log("========DOMAIN=========",DOMAIN)
-  Vue.prototype.$DOMAIN = `${DOMAIN}`;
+  Vue.prototype.$DoMain = DOMAIN;
   // 将$domain设置为vue全局变量
-  console.log("========this.DOMAIN=========",this.$DOMAIN)
+  console.log("========this.DOMAIN=========",this.$DoMain)
 }

+ 1 - 1
src/utils/request.js

@@ -8,7 +8,7 @@ import { getToken } from '@/utils/auth'
 var URL = process.env.VUE_APP_BASE_API
 console.log(URL,'===========URL')
 console.log(process.env.VITE_DOMAIN,'===========VITE_DOMAIN')
-console.log(this.$DOMAIN,'======this.$DOMAIN=====')
+console.log(this.$DoMain,'======this.$DOMAIN=====')
 //获取当前url
 if(URL.indexOf('/')==0 && URL.length==1){
   URL= window.location.protocol + "//"+window.location.host+URL