export default {
	data() {
		return {
			showTop: false,
			scrollTop: 0,
			oldLocation: 0,
            minScrollTop: 400, // 内置最小scrollTop值设置, 方便组件自身差异化设置
		}
	},
	methods: {
		scrollToTopNative() {
			uni.pageScrollTo({
				duration: 200,
				scrollTop: 0
			});
		}
	},
	onReachBottom() {
		if(this.$refs.goodrecommend) this.$refs.goodrecommend.getLikeList(10)
	},
	onPageScroll(e) {
		this.oldLocation = e.scrollTop;
		if (e.scrollTop > this.minScrollTop) {
			this.showTop = true;
		} else {
			this.showTop = false;
		}
	}
}
