vue全局变量apiurl

1、定义

在main.js里面定义 

Vue.prototype.$apiUrl = " http://xxxxxxxxxx";
2、使用
在联调的时候
url: this.$apiUrl + "/xxxx(端口)"
原文地址:https://www.cnblogs.com/lsyy2017/p/11219905.html