Showing
1 changed file
with
1 additions
and
1 deletions
| @@ -127,7 +127,7 @@ Page({ | @@ -127,7 +127,7 @@ Page({ | ||
| 127 | pageScrollToTop: function () { | 127 | pageScrollToTop: function () { |
| 128 | wx.createSelectorQuery().select('.pages').boundingClientRect(function (rect) { | 128 | wx.createSelectorQuery().select('.pages').boundingClientRect(function (rect) { |
| 129 | // 使页面滚动到底部 | 129 | // 使页面滚动到底部 |
| 130 | - if(rect.top){ | 130 | + if(rect && rect.top){ |
| 131 | wx.pageScrollTo({ | 131 | wx.pageScrollTo({ |
| 132 | scrollTop: rect.top | 132 | scrollTop: rect.top |
| 133 | }) | 133 | }) |
-
Please register or login to post a comment