为了解决这个问题,有两种开发思路,一是在引入 axios 以后,修改原型链,二是结合 Vuex,封装一个 aciton。 import Vue from 'vue' import Vuex from 'vuex' import axios from 'axios' 方法一 //mutations.js const mutations={ getNewlists(state) { axios({ method: 'get', url: baseURL+'/social/fangles/findLatest' }).then(function(res){ console.log(res); state.schoolNewList=res.data; }) } } //news.vue this.$store.dispatch('getNewlists') 方法二 Vue.prototype.$ajax = axios methods: { getNewlists () { this.$ajax({ method: 'get', url: baseURL+'/social/fangles/findLatest', }).then(function(res){ console.log(res) }) }