Showing
1 changed file
with
23 additions
and
11 deletions
... | ... | @@ -10,9 +10,15 @@ |
10 | 10 | </view> |
11 | 11 | <view style="height: 76rpx;"></view> |
12 | 12 | <view class="notify-main"> |
13 | + <!-- 无数据图片 --> | |
14 | + <view v-if="list.length == 0" style="position: relative;top: 100rpx;flex-direction: column;" class="u-flex"> | |
15 | + <view><image style="width: 280rpx;height: 250rpx;" src="../../static/empty.png"></image></view> | |
16 | + <view style="text-align: center;"><text style="font-size: 12px;color: gray;">~ 空空如也 ~</text></view> | |
17 | + </view> | |
18 | + <!-- 无数据图片 --> | |
13 | 19 | <mescroll-body ref="mescrollRef" @init="mescrollInit" :down="downOption" @down="downCallback" @up="upCallback"> |
14 | 20 | <view class="u-flex main"> |
15 | - <view @click="clickNotifyDetail(item.sysNotice)" class="u-flex main-item" v-for="(item, index) in list" :key="index"> | |
21 | + <view @click="clickNotifyDetail(item, index)" class="u-flex main-item" v-for="(item, index) in list" :key="index"> | |
16 | 22 | <view class="u-flex item"> |
17 | 23 | <view class="item-avatar"><u-avatar class="avatar" shape="circle" size="40" :src="item.sysNotice.avatar"></u-avatar></view> |
18 | 24 | <view class="u-flex item-content"> |
... | ... | @@ -72,7 +78,8 @@ export default { |
72 | 78 | }, |
73 | 79 | list: [], |
74 | 80 | pre: false, |
75 | - isJudgeNextPage: '' | |
81 | + isJudgeNextPage: '', | |
82 | + distance: 0 | |
76 | 83 | }; |
77 | 84 | }, |
78 | 85 | onLoad(e) { |
... | ... | @@ -84,14 +91,20 @@ export default { |
84 | 91 | onShow() { |
85 | 92 | this.pre = uni.getStorageSync('storagePre'); |
86 | 93 | if (this.pre) { |
87 | - this.page.num = 1; | |
88 | - this.loadData(this.page.num); | |
94 | + // this.page.num = 1; | |
95 | + // this.loadData(this.page.num); | |
89 | 96 | } |
90 | 97 | }, |
91 | 98 | onHide() { |
92 | 99 | uni.removeStorageSync('storagePre'); |
93 | 100 | }, |
94 | 101 | methods: { |
102 | + // topBack(num) { | |
103 | + // uni.pageScrollTo({ | |
104 | + // scrollTop: 0, // 滚动到页面的目标位置 这个是滚动到顶部, 0 | |
105 | + // duration: 10 // 滚动动画的时长 | |
106 | + // }); | |
107 | + // }, | |
95 | 108 | formatType(e) { |
96 | 109 | return e?.type == 'OTHER' ? '其他' : e?.type == 'MEETING' ? '会议' : '公告'; |
97 | 110 | }, |
... | ... | @@ -145,19 +158,18 @@ export default { |
145 | 158 | } |
146 | 159 | }) |
147 | 160 | .catch(e => { |
148 | - uni.$u.toast(e.data?.message); | |
161 | + // uni.$u.toast(e.data?.message); | |
149 | 162 | this.mescroll.endErr(); |
150 | 163 | }); |
151 | 164 | }, |
152 | - clickNotifyDetail(e) { | |
165 | + clickNotifyDetail(e, i) { | |
166 | + this.list[i].readStatus = 1; | |
153 | 167 | uni.$u.http |
154 | - .get(`/yt/noticeUser/${e.id}`) | |
168 | + .get(`/yt/noticeUser/${e.sysNotice.id}`) | |
155 | 169 | .then(res => {}) |
156 | - .catch(e => { | |
157 | - uni.$u.toast(e.data?.message); | |
158 | - }); | |
170 | + .catch(e => {}); | |
159 | 171 | uni.navigateTo({ |
160 | - url: './notifyDetail?data=' + encodeURIComponent(JSON.stringify(e)) | |
172 | + url: './notifyDetail?data=' + encodeURIComponent(JSON.stringify(e.sysNotice)) | |
161 | 173 | }); |
162 | 174 | } |
163 | 175 | } | ... | ... |