邓洁 : 修改小程序bug

This commit is contained in:
邓洁
2023-05-07 14:31:40 +08:00
parent 4b15b475af
commit 5f3889217b
7 changed files with 48 additions and 61 deletions

View File

@@ -1,8 +1,8 @@
<template>
<view>
<productsByTime ref="productsByTime" @getTimeLength="getTimeLength"></productsByTime>
<productsByThumb ref="productsByThumb" :reportPageSize="6" @getThumbLength="getThumbLength"></productsByThumb>
<view style="font-size: 24rpx;color: #A3A3A3;text-align: center;padding: 26rpx 0;"
v-show="reachBottomLength===0">
v-show="reachBottomLength===0||reachBottomLength<=4">
没有更多数据了</view>
</view>
</template>
@@ -11,26 +11,20 @@
export default {
data() {
return {
reachBottomLength: ''
reachBottomLength: '',
reportPageSize: ''
}
},
onReachBottom() {
this.$refs.productsByTime.pageNum++
this.$refs.productsByTime.getProductsByTime()
},
onLoad() {
this.$refs.productsByTime.pageSize = 2
this.$refs.productsByTime.getProductsByTime()
this.$refs.productsByThumb.pageSize = 4
this.$refs.productsByThumb.pageNum++
this.$refs.productsByThumb.getProductsByThumb()
},
methods: {
//获取按上架时间排列的产品列表length
getTimeLength(e) {
getThumbLength(e) {
this.reachBottomLength = e
}
}
}
</script>
<style>
</style>