uni.createSelectorQuery().select(".content").boundingClientRect(data=>{//最外层盒子节点/
uni.createSelectorQuery().select(".box1").boundingClientRect((res)=>{/目标节点、也可以是最外层的父级节点
uni.pageScrollTo({
duration:0,//过渡时间必须为0,uniapp bug,否则运行到手机会报错
scrollTop:res.top - data.top,//滚动到实际距离是元素距离顶部的距离减去最外层盒子的滚动距离
})
}).exec()
}).exec();