vue全局变量apiurl

1、定义

在main.js里面定义 

Vue.prototype.$apiUrl = " http://xxxxxxxxxx";
2、使用
在联调的时候
url: this.$apiUrl + "/xxxx(端口)"
posted @ 2019-07-21 00:19  在学习编程的lsy呀  阅读(1666)  评论(0编辑  收藏  举报