$api 回调函数then应用

 

 

getReceiveListAPI (param) {
      return new Promise(resolve => {
        let params = {
          // idCard: this.idCard,
          // typeFlag: this.typeFlag
          ...param
        }
        this.$api('/API/dataReport/getReceiveList', params).then(res => {
          if (res.status === 20) {
            this.consoleInfo('getRepeatList res', res)
            resolve(res)
          }
        })
      })
    },

 

posted @ 2019-08-30 11:03  彭成刚  阅读(1202)  评论(0编辑  收藏  举报