默认请求接口获取response的返回结果

这样在读取数据的时候还需要加一层data:response.data.data,有没有配置项直接让response返回data,而不用通过response.data去获取?
axios 拦截器中response配置返回“return res.data;”如下:
axios.interceptors.response.use(res => {
return res.data;
})
原文:https://www.cnblogs.com/samve/p/13363178.html
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!