diff --git a/packageMine/myReport/myReport.vue b/packageMine/myReport/myReport.vue index 7863023..cddfacb 100644 --- a/packageMine/myReport/myReport.vue +++ b/packageMine/myReport/myReport.vue @@ -20,6 +20,9 @@ @click="clickTab"> + + 刷新加载中 + @@ -83,6 +86,7 @@ ], reportList: [], // 列表数据 dataList:[], //初始数据列表 + timer: null, } }, watch: { @@ -132,7 +136,15 @@ // 监听滚动条位置 PageScroll(e) { this.scrollTop = e.detail.scrollTop; - // console.log(e) + console.log(e.detail.scrollTop, 'e.detail.scrollTop') + if(e.detail.scrollTop < 0 && this.timer === null) { + this.timer = setTimeout(() => { + this.pageIndex = 1 + this.fetchReportData() + clearTimeout(this.timer) + this.timer = null + },3000) + } }, //上滑加载 ReachBottom() { @@ -157,7 +169,11 @@ 'token':'', } getReportList(data).then(res => { - this.dataList = this.dataList.concat(res.reportInfoVOs) + if(this.pageIndex === 1) { + this.dataList = res.reportInfoVOs + } else { + this.dataList = this.dataList.concat(res.reportInfoVOs) + } // this.dataList = [] this.loading = false this.clickTab(null, getLocationParams('tabType') || '0'); @@ -186,6 +202,13 @@