Commit b77cb32760de2e315d6b8a757f21932c0d8b5e97

Authored by vking
1 parent 3148453c

周到安排

@@ -35,6 +35,9 @@ Page({ @@ -35,6 +35,9 @@ Page({
35 this.arrangeDesk(desk) 35 this.arrangeDesk(desk)
36 }) 36 })
37 }, 37 },
  38 + onUnload(){
  39 + PubSub.off('arrangeDesk')
  40 + },
38 onShow: function () { 41 onShow: function () {
39 this.notice = this.selectComponent('#notice'); 42 this.notice = this.selectComponent('#notice');
40 gl.getHasEditorFlag().then(() => { 43 gl.getHasEditorFlag().then(() => {
@@ -37,7 +37,9 @@ Page({ @@ -37,7 +37,9 @@ Page({
37 }); 37 });
38 }) 38 })
39 }, 39 },
40 - 40 + onUnload(){
  41 + PubSub.off('fulshReseveList')
  42 + },
41 /** 43 /**
42 * 生命周期函数--监听页面初次渲染完成 44 * 生命周期函数--监听页面初次渲染完成
43 */ 45 */
@@ -125,9 +127,11 @@ Page({ @@ -125,9 +127,11 @@ Page({
125 pageScrollToTop: function () { 127 pageScrollToTop: function () {
126 wx.createSelectorQuery().select('.pages').boundingClientRect(function (rect) { 128 wx.createSelectorQuery().select('.pages').boundingClientRect(function (rect) {
127 // 使页面滚动到底部 129 // 使页面滚动到底部
128 - wx.pageScrollTo({  
129 - scrollTop: rect.top  
130 - }) 130 + if(rect.top){
  131 + wx.pageScrollTo({
  132 + scrollTop: rect.top
  133 + })
  134 + }
131 }).exec() 135 }).exec()
132 }, 136 },
133 }) 137 })