使用vue-resource请求数据的步骤 1、需要安装 vue-resource模块 注意加上--save npm install vue-resource --save 2、main.js 引入vue-resource import VueResource from 'vue-resource'; 3、Vue.use(VueResource); 4、在组件里面直接使用 this.$http.get('url').then(function(res){},function(){err})