29812
This commit is contained in:
@@ -78,7 +78,9 @@
|
||||
hideStatus: false,
|
||||
pageShow: false,
|
||||
id: '',
|
||||
totalInfo: {}
|
||||
current: 1,
|
||||
totalInfo: {},
|
||||
isMore: false
|
||||
}
|
||||
},
|
||||
|
||||
@@ -126,6 +128,12 @@
|
||||
|
||||
onChange (e) {
|
||||
this.date = e.detail.value
|
||||
this.isMore = false
|
||||
this.current = 1
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
getInfo (id) {
|
||||
@@ -163,16 +171,40 @@
|
||||
},
|
||||
|
||||
getList () {
|
||||
this.$http.post(`/api/appalbumphoto/DetailByAlbumID?albumId=${this.id}&size=1000`).then(res => {
|
||||
if (this.isMore) return
|
||||
this.$http.post(`/api/appalbumphoto/DetailByAlbumID`, null, {
|
||||
params: {
|
||||
albumId: this.id,
|
||||
pageSize: 10,
|
||||
queryTime: this.date,
|
||||
pageNum: this.current
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.list = res.data.records
|
||||
if (this.current > 1) {
|
||||
this.list = [...this.list, ...res.data.records]
|
||||
} else {
|
||||
this.list = res.data.records
|
||||
}
|
||||
|
||||
if (res.data.length) {
|
||||
this.coverImg = res.data[0].photoUrl
|
||||
if (res.data.records.length < 10) {
|
||||
this.isMore = true
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
this.current = this.current + 1
|
||||
|
||||
if (res.data.records.length) {
|
||||
this.coverImg = res.data.records[0].photoUrl
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
onReachBottom () {
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user