Browse Source

修改域名

seimin 2 years ago
parent
commit
0469bdf21c
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/App.vue
  2. 1 1
      src/main.js

+ 1 - 1
src/App.vue

@@ -11,7 +11,7 @@ export default {
11 11
   name: "App",
12 12
   data() {
13 13
     return {
14
-      baseUrl: document.location.protocol + "//" + document.domain,
14
+      baseUrl: document.location.protocol + "//" + location.host,
15 15
       isService:false,//服务台
16 16
       isUser:false,//运维端
17 17
       isReq:false,//报修端

+ 1 - 1
src/main.js

@@ -6,7 +6,7 @@ import axios from 'axios'
6 6
 
7 7
 Vue.config.productionTip = false
8 8
 
9
-let domainName = document.domain; //域名
9
+let domainName = location.host; //域名
10 10
 let protocolName = document.location.protocol; //http协议
11 11
 axios.defaults.baseURL = protocolName + "//" + domainName;
12 12
 Vue.prototype.$http = axios;