zoukankan      html  css  js  c++  java
  • Async和Await的用法

    for(let i=0; i <that.openIds.length;i++){
    
                        let openId = that.openIds[i];
                        let res = await that.getUserInfo(openId);
                        let userName = res.data.data.userName;
                        let nickName =  res.data.data.nickName;
                        await that.initRoom(openId,userName);
                        console.log("初始化ROOM结束,join用户id",window.Evp.User.info.id);
                        await this.updateUser(openId,userName)
                        console.info("更新用户信息成功:{},{},{}", window.Evp.User.info.id, window.Evp.User.info.third_party_id, window.Evp.User.info.nickname)
                        await that.joinLottery();
    
                        console.log("=========================================================================================")
                    }
  • 相关阅读:
    二维数组
    数组经典排序
    数组复制方法
    循环
    方法和包
    switch

    注释
    面向对象优点
    有参
  • 原文地址:https://www.cnblogs.com/houchen/p/14710653.html
Copyright © 2011-2022 走看看