引入axios,并且已经挂到vue实例上面了。
this.$http.get(‘api/getNewsList’).then((res)=>{this.news=res.data}).catch((err)=>{console.log(err)})
使用的时候报出了上述错误
解决方法
// import VueResource from ‘vue-resource’
// Vue.use(VueResource);
老铁把这两个注释了就好了

引入axios,并且已经挂到vue实例上面了。
this.$http.get(‘api/getNewsList’).then((res)=>{this.news=res.data}).catch((err)=>{console.log(err)})
使用的时候报出了上述错误
解决方法
// import VueResource from ‘vue-resource’
// Vue.use(VueResource);
老铁把这两个注释了就好了
站点小黑板
欢迎来到这里 👋
快速定位内容
说说更新
换个口味
热门主题