doctorComments(this.$route.params.hid, this.$route.params.fid, this.doctorHisId, this.createdon, this.pageno, 5) //1.axios
.then(d => {//2.
let dc = new Array()
for(let i=0;i<d.list.length;iPP){
dc[i] = {doctorComments:d.list[i],isZhanshiComment:false}
}
this.doctorComments = this.doctorComments.concat(dc);
this.$refs.scroller.donePullup();
})
.then(()=>{//3.
this.$options.methods.compareHeightComment();
})
3. The method called in requires information about the doctorcommts array. I want to use the relevant methods of js promise to chain calls, but I still can"t get the data set in 2 when I write the method in 3. The array length length in 2 is undfined.
vue.js.
Gods, how can the method in 3 get the value set by 2?