axios.interceptors.request.use(
config => {
store.commit('showLoading')
error => {
store.commit('hideLoading')
})
axios.interceptors.response.use(
response => {
store.commit('hideLoading')
},
error => {
store.commit('hideLoading')
}
);
---------------------
作者:射手男很懒
原文:https://blog.csdn.net/qq_36247432/article/details/83054140
版权声明:本文为博主原创文章,转载请附上博文链接!