-
Notifications
You must be signed in to change notification settings - Fork 415
Closed as not planned
Description
第一页数据加载还没有触发scroll,目前是这么处理的:
loadMore() {
if (!this.lastPage) {
this.page++
native.clickLog('productmore')
this.getProdList()
}
},
getProdList() {
this.busy = true
getProdList(this.queryStr, this.page)
.then(data => {
this.prodList = this.page === PAGE_START_NUM ? data.datas : this.prodList.concat(data.datas)
this.lastPage = !data.hasNext
})
.then(() => {
this.busy = false
})
.then(() => {
const reachBottom = this.$refs.prodList.getBoundingClientRect().bottom >= window.innerHeight
if (!reachBottom) {
this.loadMore()
}
})
}
Metadata
Metadata
Assignees
Labels
No labels