Showing
1 changed file
with
13 additions
and
10 deletions
@@ -79,7 +79,8 @@ export default { | @@ -79,7 +79,8 @@ export default { | ||
79 | list: [], | 79 | list: [], |
80 | pre: false, | 80 | pre: false, |
81 | isJudgeNextPage: '', | 81 | isJudgeNextPage: '', |
82 | - distance: 0 | 82 | + distance: 0, |
83 | + scrollDistance: 0 | ||
83 | }; | 84 | }; |
84 | }, | 85 | }, |
85 | onLoad(e) { | 86 | onLoad(e) { |
@@ -91,20 +92,12 @@ export default { | @@ -91,20 +92,12 @@ export default { | ||
91 | onShow() { | 92 | onShow() { |
92 | this.pre = uni.getStorageSync('storagePre'); | 93 | this.pre = uni.getStorageSync('storagePre'); |
93 | if (this.pre) { | 94 | if (this.pre) { |
94 | - // this.page.num = 1; | ||
95 | - // this.loadData(this.page.num); | ||
96 | } | 95 | } |
97 | }, | 96 | }, |
98 | onHide() { | 97 | onHide() { |
99 | uni.removeStorageSync('storagePre'); | 98 | uni.removeStorageSync('storagePre'); |
100 | }, | 99 | }, |
101 | methods: { | 100 | methods: { |
102 | - // topBack(num) { | ||
103 | - // uni.pageScrollTo({ | ||
104 | - // scrollTop: 0, // 滚动到页面的目标位置 这个是滚动到顶部, 0 | ||
105 | - // duration: 10 // 滚动动画的时长 | ||
106 | - // }); | ||
107 | - // }, | ||
108 | formatType(e) { | 101 | formatType(e) { |
109 | return e?.type == 'OTHER' ? '其他' : e?.type == 'MEETING' ? '会议' : '公告'; | 102 | return e?.type == 'OTHER' ? '其他' : e?.type == 'MEETING' ? '会议' : '公告'; |
110 | }, | 103 | }, |
@@ -117,6 +110,17 @@ export default { | @@ -117,6 +110,17 @@ export default { | ||
117 | this.page.num = 1; | 110 | this.page.num = 1; |
118 | this.model1.userInfo.type = e.name; | 111 | this.model1.userInfo.type = e.name; |
119 | this.loadData(1, this.isJudgeNextPage == '' ? null : this.isJudgeNextPage); | 112 | this.loadData(1, this.isJudgeNextPage == '' ? null : this.isJudgeNextPage); |
113 | + uni.pageScrollTo({ | ||
114 | + scrollTop: this.scrollDistance + 20, | ||
115 | + duration: 50 | ||
116 | + }); | ||
117 | + uni.pageScrollTo({ | ||
118 | + scrollTop: this.scrollDistance - 20, | ||
119 | + duration: 50 | ||
120 | + }); | ||
121 | + }, | ||
122 | + onPageScroll(e) { | ||
123 | + this.scrollDistance = e.scrollTop; | ||
120 | }, | 124 | }, |
121 | /*下拉刷新的回调 */ | 125 | /*下拉刷新的回调 */ |
122 | downCallback() { | 126 | downCallback() { |
@@ -158,7 +162,6 @@ export default { | @@ -158,7 +162,6 @@ export default { | ||
158 | } | 162 | } |
159 | }) | 163 | }) |
160 | .catch(e => { | 164 | .catch(e => { |
161 | - // uni.$u.toast(e.data?.message); | ||
162 | this.mescroll.endErr(); | 165 | this.mescroll.endErr(); |
163 | }); | 166 | }); |
164 | }, | 167 | }, |