<template>
	<view>
		<productsByTime ref="productsByTime" @getTimeLength="getTimeLength"></productsByTime>
		<view style="font-size: 24rpx;color: #A3A3A3;text-align: center;padding: 26rpx 0;"
			v-show="reachBottomLength===0">
			没有更多数据了</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				reachBottomLength: ''
			}
		},
		onReachBottom() {
			this.$refs.productsByTime.pageNum++
			this.$refs.productsByTime.getProductsByTime()
		},
		onLoad() {
			this.$refs.productsByTime.pageSize = 2
			this.$refs.productsByTime.getProductsByTime()
		},
		methods: {
			//获取按上架时间排列的产品列表length
			getTimeLength(e) {
				this.reachBottomLength = e
			}
		}
	}
</script>

<style>

</style>
