소스 검색

http 地址 根据localhost获取

zhangsijie 2 년 전
부모
커밋
2d4f5ca429
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      pingpu_vue/src/main.js

+ 1 - 1
pingpu_vue/src/main.js

@@ -25,7 +25,7 @@ Vue.prototype.$axios = axios;
 // import qs from 'qs'
 Vue.prototype.qs = Qs; // 全局注册,使用方法为:this.qs
 // Vue.prototype.$http = "http://106.119.196.18:10004";
-Vue.prototype.$http = window.location.host;
+Vue.prototype.$http = window.location.origin;
 /* eslint-disable no-new */
 const ElementUI = require("element-ui");
 Vue.use(ElementUI);