vue axios 通过await Promise封装后获得不了catch错误信息

2020-04-15 15:15:33

当我们用promise封装了axios,我们用await res 获得不了错误信息

如果同步到话,这个时候我们需要用try catch获得,这样看来,我们还是用then catch比较好