You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
如上来自 playground 中 api 包中的代码,我观察到 requestClient.post 返回的是一个 Promise,在 async 函数中会再被包一层 Promise 是否是符合预期的?
最初发现在业务逻辑中 then 时 console.log(resp) 时,打印始终是 Promise,打印 resp.data.xx 时是正确的。
所以上面的代码是否会导致 Promise 嵌套,是否应该修改为如下:
Beta Was this translation helpful? Give feedback.
All reactions