xhr.js:171 Uncaught (in promise) AxiosError
时间: 2023-10-12 21:00:46 浏览: 109
问题中提到的错误是xhr.js:171 Uncaught (in promise) AxiosError。根据引用的内容,这个错误可能是由于数据请求超时引起的。根据引用,我们可以在main.js中设置axios的超时时间来解决这个问题。可以在main.js中添加axios.default.timeout=50000,将超时时间设置为50秒。另外,根据引用,如果axios被封装到request中,也可以在配置axios时修改超时时间来解决这个问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [vue项目中 Uncaught (in promise) Error 解决](https://blog.csdn.net/weixin_59519449/article/details/123620873)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [Uncaught (in promise) Error: timeout of 5000ms exceeded](https://blog.csdn.net/qq_44774831/article/details/116376548)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文