import axios from 'axios'
Vue.prototype.$http = axios

其他地方使用的话 如同使用 vue-resource 一样

this.$http.get(URL).then(response => {
    // success callback
}, response => {
    // error callback
})
posted on 2018-02-23 10:59  青青-小草  阅读(135)  评论(0编辑  收藏  举报