您当前的位置: 首页 > 

暂无认证

  • 0浏览

    0关注

    92582博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

promise函数调用的技巧,被调用的函数再返回一个promise就可以then再调用

发布时间:2021-12-01 18:42:48 ,浏览量:0

function func1() { // getChargeType是请求的API return getChargeType().then(({ result }) => { console.log(result); return result; }); }; func1().then((res) => { console.log(res); // getChargeItemsQueryById是请求的API getChargeItemsQueryById({ id: record.chargeItemId }).then(({ result }) => { console.log(result); }); }); 

2021-12-01

关注
打赏
1653961664
查看更多评论
立即登录/注册

微信扫码登录

0.4228s