【发布时间】:2021-02-09 19:51:10
【问题描述】:
我正在学习本教程。
https://www.djamware.com/post/5fc19e3e77862f22905c7f03/ionic-5-tutorial-oauth2-login-example-vue
在本教程中,他正在调用这个函数,该函数调用每个 axios 请求
mountRequestInterceptor() {
this._requestInterceptor = axios.interceptors.request.use(async config => {
console.log("show loading");
const loading = await loadingController.create({
message: 'Please wait...'
});
await loading.present();
return config;
});
console.log(this._requestInterceptor,'sasdas')
},
问题是加载在 axios 请求上开始但从未停止。
我希望它在请求成功时停止
【问题讨论】:
标签: javascript vue.js ionic-framework axios