Commit be89a6c615f19fa4a7eab0a3467e74626019f17e

Authored by xp.Huang
2 parents c7b6f13e baa61957

Merge branch 'ft-dev' into 'main'

fix:修改通知分页前端判断状态

See merge request huang/thingskit-app!48
... ... @@ -138,21 +138,20 @@ export default {
138 138 }
139 139 });
140 140 },
141   - showToastWip(){
142   - uni.$u.toast('拼命开发中 ...')
  141 + showToastWip() {
  142 + uni.$u.toast('拼命开发中 ...');
143 143 },
144 144 openCamera() {
145   - // uni.navigateTo({
146   - // url: 'camera/camera'
147   - // });
148   - this.showToastWip()
  145 + uni.navigateTo({
  146 + url: 'camera/camera'
  147 + });
  148 + // this.showToastWip()
149 149 },
150 150 openOrgStatus() {
151 151 // uni.navigateTo({
152 152 // url: 'configuration/configuration'
153 153 // });
154   - this.showToastWip()
155   -
  154 + this.showToastWip();
156 155 },
157 156 //告警状态查询
158 157 navigatorAlarmStatus(e) {
... ...
... ... @@ -249,7 +249,8 @@ export default {
249 249 let userInfo = {
250 250 ...resObj,
251 251 token: true, //token用于判断是否登录
252   - isThirdLogin: false
  252 + isThirdLogin: false,
  253 + isThirdLoginAndNoDind: true
253 254 };
254 255 if (userInfo.token) {
255 256 this.setUserInfo(userInfo);
... ... @@ -311,7 +312,8 @@ export default {
311 312 let userInfo = {
312 313 ...resObj,
313 314 token: true, //token用于判断是否登录
314   - isThirdLogin: false
  315 + isThirdLogin: false,
  316 + isThirdLoginAndNoDind: true
315 317 };
316 318 if (userInfo.token) {
317 319 this.setUserInfo(userInfo);
... ...
... ... @@ -46,13 +46,16 @@
46 46 </u--form>
47 47 </view>
48 48 <view class="basic-bottom u-flex">
49   - <view class="item" v-if="info.data.isThirdLoginAndNoDind">
  49 + <view class="item" v-if="info.data.isThirdLoginAndNoDind && isJudgeBindBtn">
50 50 <button class="submit" size="default" @click="clearAccountFunc" :style="{ background: InfoColor }"><text class="un-bind-text">解绑</text></button>
51 51 </view>
52 52 <view
53 53 class="item"
54 54 style="margin-right: 60rpx;"
55   - :style="[{ position: info.data.isThirdLoginAndNoDind ? '' : 'relative' }, { right: info.data.isThirdLoginAndNoDind ? '' : '-190rpx' }]"
  55 + :style="[
  56 + { position: info.data.isThirdLoginAndNoDind && isJudgeBindBtn ? '' : 'relative' },
  57 + { right: info.data.isThirdLoginAndNoDind && isJudgeBindBtn ? '' : '-190rpx' }
  58 + ]"
56 59 >
57 60 <button class="submit" size="default" @click="onSubmitFunc" :style="{ background: PrimaryColor }"><text class="un-bind-text">确认</text></button>
58 61 </view>
... ... @@ -100,7 +103,8 @@ export default {
100 103 id: '',
101 104 info: {},
102 105 openIds: '',
103   - isUpdatePersonOrLoginInfo: false
  106 + isUpdatePersonOrLoginInfo: false,
  107 + isJudgeBindBtn: true
104 108 };
105 109 },
106 110 onLoad(e) {
... ... @@ -141,6 +145,7 @@ export default {
141 145 title: '解绑成功'
142 146 });
143 147 this.showBind = false;
  148 + this.isJudgeBindBtn = false;
144 149 } else {
145 150 uni.showToast({
146 151 title: '解绑失败'
... ...
... ... @@ -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 }
... ...