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()
官方文档:SelectorQuery | 微信开放文档微信开发者平台文档https://developers./miniprogram/dev/api/wxml/wx.createSelectorQuery.html