vue_resource.js
import Vue from "vue"
import vueResource from "vue-resource"
Vue.use(vueResource)
let baseUrl = 'http://localhost:2000'
Vue.http.options.emulateJSON = true;
Vue.http.interceptors.push((request, next) => {
// help.showLoading = true; //you can do something in interceptors
request.headers.set('TOKEN', "i am the token");//配置请求头
next((response) => {