記錄一個循環同步請求的方式

      await Promise.all(this.watchArr.map((item, index) => {
        return this.request('getOptionsQueryRange', {
          'ip': this.ip,
          'query': this.researchName,
          'start': startAxisTime,
          'end': endAxisTime,
          'step': '1s',
          'extern': {
            'pid': this.watchArr[index].pid,
            'name': this.watchArr[index].name
          }
        })
      })).then(resArr => {
            。。。
      })
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章