从信息通知跳转到另一个页面的评论专区
消息通知页面中的点击跳转
var that = this;
const query = uni.createSelectorQuery().in(that);
query.select('#tab_1').boundingClientRect(data => {
// console.log("得到布局位置信息" + JSON.stringify(data));
console.log("节点离页面顶部的距离为1---" + data.top);
this.one_croll = Number(data.top - this.CustomBar - this.StatusBar - 40);
// two_croll:0,
// three_croll:0,
// four_croll:0,
}).exec();
uni.pageScrollTo({
scrollTop: this.one_croll,
duration: 300
});
参考: