settle.js:19 Uncaught (in promise)
时间: 2023-10-29 13:18:22 浏览: 68
解决Vue-Router升级导致的Uncaught (in promise)问题
这个错误是由于在拦截器中的if判断逻辑引起的。根据引用中的描述,原始代码中的判断是response.data.status !== 1,如果请求失败,就会触发Promise.reject(rejection)报错。但是在你修改的代码中,你返回的正确请求返回值中response.data.status=200,因此没有触发报错。这导致了Uncaught (in promise)错误的出现。要解决这个错误,你需要根据实际情况修改判断逻辑,确保在请求失败时正确地触发Promise.reject(rejection)。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [Uncaught (in promise)的解决方法,可能原因](https://blog.csdn.net/qq_32963841/article/details/125478539)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [HopfieldNets.jl:Julia 中的 Hopfield 网络](https://download.csdn.net/download/weixin_42139302/19460680)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文