标签: axios

1 篇文章

thumbnail
VUE 项目 axios 统一异常返回拦截跳转登录页面
在 vue 项目中,axios 很方便的提供了返回值统一拦截检查,可以根据此方法很方便的 判断后台返回值 将用户操作弹出登录界面。 axiosConfig.js 中增加 axios.interceptors.response.use(response => { return response; },error => { if (erro…