是因为在添加请求拦截器的时候,最后没有添加返回值return config方法 正确的写法应该是: axios.interceptors.request.use((config)=>{ if(getStore(‘token’)){ config.headers.Authorization=getStore(‘token’); } return config; },(error)=>{ console.log(error); });