把上一个接口获取的id 传给另外一个接口

82 阅读1分钟
       /** 查询试卷列表 */
        getList() {
          this.loading = true;
          listPaper(this.queryParams).then((response) => {
            this.paperList = response.rows;
            console.log('this.paperList',this.paperList);
            for (let i = 0; i < response.rows.length; i++) {
              // 查询试卷是否已被选为任务
              isPaperSelected(this.paperList[i].paperid).then((response) => {
                if (response == "isSelected") {
                  this.$set(this.paperList[i], "noSelected", false);
                  this.$set(this.paperList[i], "operatingTitle", "已用于任务");
                  // this.paperList[i].noSelected = false;
                  // this.paperList[i].operatingTitle = "已用于任务";
                } else {
                  this.$set(this.paperList[i], "operatingTitle", "");
                  this.$set(this.paperList[i], "noSelected", true);
                }
              });
            }
            this.total = response.total;
            this.loading = false;
          }