如果某一个接口需要请求头的
就在某个里面添加就好了
this.axios.get('/list',{params:{user:user}},{headers:token})
如果是全局的就去前端添加
axios.interceptors.request.use(
config => {
config.headers.token = token
如果某一个接口需要请求头的
就在某个里面添加就好了
this.axios.get('/list',{params:{user:user}},{headers:token})
如果是全局的就去前端添加
axios.interceptors.request.use(
config => {
config.headers.token = token