返回Promise对象如何处理

hykeda1年前379
返回Promise对象如何处理
在使用axios时,在终端用console.log 打印出来返回的是Promise对象,如下图:如果直接用res.code是无法获取的,Promise对象需要使用.then()方法来获取值:res.t...