//获取某DIV高度
uni.createSelectorQuery().select('.lists').boundingClientRect((res) => {
	uni.pageScrollTo({
		scrollTop: res.height,
		duration: 200
	})
}).exec()
//在onPageScroll函数中判断 is_scroll_view 为true就是到底部
let to_scroll_top = e.scrollTop+20

uni.createSelectorQuery().select('.lists').boundingClientRect((res) => {
	let a = uni.getSystemInfoSync()
	let t_height = res.height-a.screenHeight
	
	if(t_height<=to_scroll_top){
		this.is_scroll_view = true
	}else{
		this.is_scroll_view = false
	}
}).exec()
Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐