1、页面增加标签<scroll-view></scroll-view>
2、写函数:
// 页面滚动到底部
pageScrollToBottom: function() {
wx.createSelectorQuery().select('#body-view').boundingClientRect(function(rect){
// 使页面滚动到底部
wx.pageScrollTo({
scrollTop: rect.height
})
}).exec()
},
#body-view为页面的id名
在其他需要页面自动滚动的地方调用此函数
this(that).pageScrollToBottom()