时间:2021-02-17 14:03:45 | 栏目:vue | 点击:次
使用vue-resource,设置头信息:
Vue.http.interceptors.push((request, next) => { request.headers.set('Authorization', token) console.log(request.headers) next(response => { console.log(response.status) return response }) })