vue全局变量apiurl

1、定义

在main.js里面定义

Vue.prototype.$apiUrl = " http://xxxxxxxxxx";

2、使用

在联调的时候

url: this.$apiUrl + "/xxxx(端口)"