diff --git a/src/views/ebiz/congratulation/CongratulationList.vue b/src/views/ebiz/congratulation/CongratulationList.vue index 796d3b2f5..e68a89aca 100644 --- a/src/views/ebiz/congratulation/CongratulationList.vue +++ b/src/views/ebiz/congratulation/CongratulationList.vue @@ -1,10 +1,13 @@ @@ -23,17 +26,14 @@ export default { }, data() { return { - active: '0', posterType: 'hb', srcUrl: '@/images/u10199.png', pageNum: 1, pageSize: 9, posterList: [], // 贺报列表 imgUrls: [], - show: false, index: 0, - loading: true, - finished: false + totalPage: 0 } }, created() { @@ -54,12 +54,8 @@ export default { } let res = await getPosterList(param) if (res.result == 0) { - if (res.pageInfo.pages === this.pageNum) { - this.finished = true - } - this.loading = false - this.pageNum++ - this.posterList.push(...res.pageInfo.list) + this.totalPage = res.pageInfo.pages + this.posterList = res.pageInfo.list for (let item of this.posterList) { let url = (config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${item.posterNarrowUrl}`).replace(/\+/g, '%2B') item.realUrl = url @@ -74,12 +70,21 @@ export default { images: this.imgUrls, startPosition: index }) + }, + pageChange(pageNum) { + this.pageNum = pageNum + this.getPostList() } } }