Преглед изворни кода

http 地址 根据localhost获取

zhangsijie пре 2 година
родитељ
комит
d875d08dfb
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      pingpu_vue/src/main.js

+ 2 - 1
pingpu_vue/src/main.js

@@ -24,7 +24,8 @@ const Qs = require("qs");
 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 = "http://106.119.196.18:10004";
+Vue.prototype.$http = window.location.host;
 /* eslint-disable no-new */
 const ElementUI = require("element-ui");
 Vue.use(ElementUI);