美文网首页
async await用法

async await用法

作者: jesse28 | 来源:发表于2022-05-26 11:06 被阅读0次

    例子:

      // 调用查看接口
        async getInfo() {
          this.ruleForm = await evaluationScoreGetApi(this.id);
    
          // 获取评查类别数组start
          const { list: evaluationTypeArray2 } = await caseEvaluationTypeListApi({
            limit: 99999,
            page: 1,
            standardId: this.ruleForm.standardId,
          });
          this.evaluationTypeArray2 = evaluationTypeArray2;
          // 获取评查类别数组end
          // 获取评查要点数组start
          const { list: mainPointArray2 } = await evaluationMainpointListApi({
            limit: 99999,
            page: 1,
            standardId: this.ruleForm.standardId,
            typeId: this.ruleForm.typeId,
          });
          this.mainPointArray2 = mainPointArray2;
          // 获取评查要点数组start
          // 获取评查细则数组start
          const { list: ruleArray } = await evaluationContentListApi({
            limit: 99999,
            page: 1,
            standardId: this.ruleForm.standardId,
            typeId: this.ruleForm.typeId,
            mainpointId: this.ruleForm.mainpointId,
          });
          this.ruleArray = ruleArray;
          // 获取评查细则数组end
        },
    
    image.png

    相关文章

      网友评论

          本文标题:async await用法

          本文链接:https://www.haomeiwen.com/subject/hryuprtx.html