3f535f30
杨鑫
'初始'
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
<template>
<view class="page">
<view style="position: absolute; top: 0; width: 100%;">
<image :src="$imgUrl('/bg.png')" style="width: 100%; height: 490rpx;border-radius: 0 0 40rpx 40rpx;"></image></view>
<view class="my-top">
<view class="head" :style="'background-color: rgba(38,197,112,'+(scrollTop/50)+');'">
<view class="logo-title">
<image :src="$imgUrl('/logo.png')" ></image>
</view>
<view class="title">
</view>
<view class="setting-mess"></view>
</view>
</view>
<view class="main">
<view class="message-list">
|
e2119c70
wesley88
1
|
18
|
<!-- <view class="list" @click="toMsgList">
|
3f535f30
杨鑫
'初始'
|
19
20
21
22
23
24
25
26
|
<view class="icon-data">
<view class="icon">
<image :src="$imgUrl('/msg1.png')" mode=""></image>
</view>
<view class="data">
<view class="title">
<text>通知消息</text>
</view>
|
65478d1d
杨鑫
'最新'
|
27
|
|
3f535f30
杨鑫
'初始'
|
28
|
<view class="describe">
|
884b4bce
wesley88
1
|
29
30
31
32
|
<view v-if="tableList.length>0" >
<view v-html="tableList[0].content"></view>
</view>
<view v-else >暂无</view>
|
3f535f30
杨鑫
'初始'
|
33
34
35
|
</view>
</view>
</view>
|
04473319
wesley88
1
|
36
|
<view class="more" v-if="tableList.length>0">
|
65478d1d
杨鑫
'最新'
|
37
|
<view class="icon-more">{{formatDateTime(tableList[0]?tableList[0].createdAt:'')}}</view>
|
3f535f30
杨鑫
'初始'
|
38
|
</view>
|
e2119c70
wesley88
1
|
39
|
</view> -->
|
d560e431
wesley88
1
|
40
41
42
43
44
45
46
|
<view class="list" @click="gopath('/pagesA/procedureList/procedureList?type=通知消息')">
<view class="icon-data">
<view class="icon">
<image :src="$imgUrl('/xtxx.png')" mode=""></image>
</view>
<view class="data">
<view class="title">
|
726bc80b
杨鑫
最新
|
47
|
<text>系统通知</text>
|
d560e431
wesley88
1
|
48
49
50
51
52
53
54
55
56
57
58
59
60
|
</view>
<view class="describe">
<view v-if="tzlist.length>0" >
<view v-if="tzlist[0].content.type == '2'">{{tzlist[0].content.title}}【图片】</view>
<view v-else >{{tzlist[0].content.title}}</view>
</view>
<view v-else >暂无</view>
<!-- <text>{{?tableList[0].content:''}}</text> -->
</view>
</view>
</view>
<view class="more">
|
f43899da
wesley88
1
|
61
|
<view class="more-num" v-if="tzlist.length>0&&tzlist[0].isRead == '0'">{{tzlist.length}}</view>
|
d560e431
wesley88
1
|
62
63
64
|
<view class="icon-more" v-if="tzlist.length>0">{{formatDateTime(tzlist[0]?tzlist[0].createTime:'')}}</view>
</view>
</view>
|
06dc87e6
wesley88
1
|
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
<view class="list" @click="gopath('/pagesA/procedureList/procedureList?type=物业缴费通知')">
<view class="icon-data">
<view class="icon">
<image :src="$imgUrl('/zjjf.png')" mode=""></image>
</view>
<view class="data">
<view class="title">
<text>物业缴费通知</text>
</view>
<view class="describe">
<view v-if="wylist.length>0" >
<view v-if="wylist[0].content.type == '2'">{{wylist[0].content.title}}【图片】</view>
<view v-else >{{wylist[0].content.title}}</view>
</view>
<view v-else >暂无</view>
<!-- <text>{{?tableList[0].content:''}}</text> -->
</view>
</view>
</view>
<view class="more">
|
f43899da
wesley88
1
|
86
|
<view class="more-num" v-if="wylist.length>0&&wylist[0].isRead == '0'">{{wylist.length}}</view>
|
06dc87e6
wesley88
1
|
87
88
89
|
<view class="icon-more" v-if="wylist.length>0">{{formatDateTime(wylist[0]?wylist[0].createTime:'')}}</view>
</view>
</view>
|
e2119c70
wesley88
1
|
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
<view class="list" @click="gopath('/pagesA/procedureList/procedureList?type=租金缴费通知')">
<view class="icon-data">
<view class="icon">
<image :src="$imgUrl('/wyjf.png')" mode=""></image>
</view>
<view class="data">
<view class="title">
<text>租金缴费通知</text>
</view>
<view class="describe">
<view v-if="zjlist.length>0" >
<view v-if="zjlist[0].content.type == '2'">{{zjlist[0].content.title}}【图片】</view>
<view v-else >{{zjlist[0].content.title}}</view>
</view>
<view v-else >暂无</view>
<!-- <text>{{?tableList[0].content:''}}</text> -->
</view>
</view>
</view>
<view class="more">
|
f43899da
wesley88
1
|
111
|
<view class="more-num" v-if="zjlist.length>0&&zjlist[0].isRead == '0'">{{zjlist.length}}</view>
|
e2119c70
wesley88
1
|
112
113
114
|
<view class="icon-more" v-if="zjlist.length>0">{{formatDateTime(zjlist[0]?zjlist[0].createTime:'')}}</view>
</view>
</view>
|
61e1439e
wesley88
1
|
115
|
<view class="list" @click="gopath('/pagesA/procedureList/procedureList?type=租赁提醒')">
|
3f535f30
杨鑫
'初始'
|
116
117
|
<view class="icon-data">
<view class="icon">
|
61e1439e
wesley88
1
|
118
|
<image :src="$imgUrl('/zlxx.png')" mode=""></image>
|
3f535f30
杨鑫
'初始'
|
119
120
121
|
</view>
<view class="data">
<view class="title">
|
61e1439e
wesley88
1
|
122
|
<text>租赁提醒</text>
|
3f535f30
杨鑫
'初始'
|
123
|
</view>
|
61e1439e
wesley88
1
|
124
|
|
3f535f30
杨鑫
'初始'
|
125
|
<view class="describe">
|
61e1439e
wesley88
1
|
126
127
128
129
130
131
|
<view v-if="zllist.length>0" >
<view v-if="zllist[0].content.type == '2'">{{zllist[0].content.title}}【图片】</view>
<view v-else >{{zllist[0].content.title}}</view>
</view>
<view v-else >暂无</view>
<!-- <text>{{?tableList[0].content:''}}</text> -->
|
3f535f30
杨鑫
'初始'
|
132
133
134
135
|
</view>
</view>
</view>
<view class="more">
|
f43899da
wesley88
1
|
136
|
<view class="more-num" v-if="zllist.length>0&&zllist[0].isRead == '0'">{{zllist.length}}</view>
|
61e1439e
wesley88
1
|
137
|
<view class="icon-more" v-if="zllist.length>0">{{formatDateTime(zllist[0]?zllist[0].createTime:'')}}</view>
|
3f535f30
杨鑫
'初始'
|
138
139
|
</view>
</view>
|
3f535f30
杨鑫
'初始'
|
140
|
</view>
|
61e1439e
wesley88
1
|
141
|
|
3f535f30
杨鑫
'初始'
|
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
|
</view>
<!-- tabbar -->
<tabbar :tabBarShow="2"></tabbar>
</view>
</template>
<script>
import tabbar from '../../components/tabbar/tabbar.vue';
export default {
components: {
tabbar,
},
data() {
return {
scrollTop: 0,
|
e5b57447
杨鑫
'分包问卷'
|
158
159
160
|
tableList:[],
pagesize :{
pageNumber: 1,
|
3c4666ce
杨鑫
'最新'
|
161
162
|
pageSize: 2,
receiverMerchant:''
|
61e1439e
wesley88
1
|
163
|
},
|
d560e431
wesley88
1
|
164
|
zllist:[],
|
e2119c70
wesley88
1
|
165
|
tzlist:[],
|
06dc87e6
wesley88
1
|
166
167
|
zjlist:[],
wylist:[]
|
e5b57447
杨鑫
'分包问卷'
|
168
|
}
|
3f535f30
杨鑫
'初始'
|
169
|
},
|
e5b57447
杨鑫
'分包问卷'
|
170
|
|
e5b57447
杨鑫
'分包问卷'
|
171
|
onShow() {
|
60cd6339
杨鑫
'最新'
|
172
173
174
175
176
177
178
|
const isLogin = uni.getStorageSync('token');
if (isLogin == '') {
// 如果未登录,跳转到登录页面
uni.navigateTo({
url: '/pages/login/login'
})
} else {
|
61e1439e
wesley88
1
|
179
|
|
2067568a
杨鑫
'租金缴费'
|
180
|
this.$http.sendRequest('/cerePlatformMerchant/queryByPage', 'POST',{"pageSize":10,pageNumber:0,phone:uni.getStorageSync('user').phone}).then(res => {
|
60cd6339
杨鑫
'最新'
|
181
182
183
184
185
186
187
188
|
if(res.data.code == '20004' || res.data.code == '20003'){
uni.navigateTo({
url: '/pages/login/login'
})
}
})
}
|
3f535f30
杨鑫
'初始'
|
189
190
191
192
193
194
195
|
},
onReady() {
uni.hideTabBar();
},
onPageScroll(e) {
this.scrollTop = e.scrollTop;
},
|
e5b57447
杨鑫
'分包问卷'
|
196
197
198
|
mounted() {
this.getALL()
},
|
61e1439e
wesley88
1
|
199
200
201
|
onShow() {
this.getmsg()
},
|
3f535f30
杨鑫
'初始'
|
202
|
methods:{
|
61e1439e
wesley88
1
|
203
204
|
getmsg() {
this.zllist = []
|
d560e431
wesley88
1
|
205
|
this.tzlist = []
|
e2119c70
wesley88
1
|
206
|
this.zjlist = []
|
06dc87e6
wesley88
1
|
207
|
this.wylist = []
|
61e1439e
wesley88
1
|
208
|
let info = {
|
8e6b81ee
wesley88
1
|
209
210
|
phone:uni.getStorageSync('user').phone,
// phone:'18121815598',
|
61e1439e
wesley88
1
|
211
212
|
isRead:'0'
}
|
f43899da
wesley88
1
|
213
214
215
216
|
let info1 = {
phone:uni.getStorageSync('user').phone,
isRead:'1'
}
|
61e1439e
wesley88
1
|
217
218
219
220
221
222
223
224
|
this.$http.sendRequest('/cereMessage/viewMessage', 'POST',{...info,messageType:'租赁提醒'},1).then(res => {
let obj = res.data.data
for(let prop in obj) {
if(obj.hasOwnProperty(prop)) { // 确保只访问实例上的属性,不包括继承的
obj[prop][0].content = JSON.parse(obj[prop][0].content)
this.zllist.push(obj[prop][0])
}
}
|
5149de3a
wesley88
1
|
225
|
this.zllist.reverse()
|
f43899da
wesley88
1
|
226
227
228
229
230
231
232
233
234
235
236
237
|
if(this.zllist.length == 0){
this.$http.sendRequest('/cereMessage/viewMessage', 'POST',{...info1,messageType:'租赁提醒'},1).then(res => {
let obj = res.data.data
for(let prop in obj) {
if(obj.hasOwnProperty(prop)) { // 确保只访问实例上的属性,不包括继承的
obj[prop][0].content = JSON.parse(obj[prop][0].content)
this.zllist.push(obj[prop][0])
}
}
this.zllist.reverse()
})
}
|
d560e431
wesley88
1
|
238
239
240
241
242
243
244
245
246
|
})
this.$http.sendRequest('/cereMessage/viewMessage', 'POST',{...info,messageType:'通知消息'},1).then(res => {
let obj = res.data.data
for(let prop in obj) {
if(obj.hasOwnProperty(prop)) { // 确保只访问实例上的属性,不包括继承的
obj[prop][0].content = JSON.parse(obj[prop][0].content)
this.tzlist.push(obj[prop][0])
}
}
|
5149de3a
wesley88
1
|
247
|
this.tzlist.reverse()
|
f43899da
wesley88
1
|
248
249
250
251
252
253
254
255
256
257
258
259
|
if(this.tzlist.length == 0){
this.$http.sendRequest('/cereMessage/viewMessage', 'POST',{...info1,messageType:'通知消息'},1).then(res => {
let obj = res.data.data
for(let prop in obj) {
if(obj.hasOwnProperty(prop)) { // 确保只访问实例上的属性,不包括继承的
obj[prop][0].content = JSON.parse(obj[prop][0].content)
this.tzlist.push(obj[prop][0])
}
}
this.tzlist.reverse()
})
}
|
61e1439e
wesley88
1
|
260
|
})
|
e2119c70
wesley88
1
|
261
262
263
264
265
266
267
268
269
|
this.$http.sendRequest('/cereMessage/viewMessage', 'POST',{...info,messageType:'租金缴费通知'},1).then(res => {
let obj = res.data.data
for(let prop in obj) {
if(obj.hasOwnProperty(prop)) { // 确保只访问实例上的属性,不包括继承的
obj[prop][0].content = JSON.parse(obj[prop][0].content)
this.zjlist.push(obj[prop][0])
}
}
this.zjlist.reverse()
|
f43899da
wesley88
1
|
270
271
272
273
274
275
276
277
278
279
280
281
|
if(this.zjlist.length == 0){
this.$http.sendRequest('/cereMessage/viewMessage', 'POST',{...info1,messageType:'租金缴费通知'},1).then(res => {
let obj = res.data.data
for(let prop in obj) {
if(obj.hasOwnProperty(prop)) { // 确保只访问实例上的属性,不包括继承的
obj[prop][0].content = JSON.parse(obj[prop][0].content)
this.zjlist.push(obj[prop][0])
}
}
this.zjlist.reverse()
})
}
|
e2119c70
wesley88
1
|
282
|
})
|
06dc87e6
wesley88
1
|
283
284
285
286
287
288
289
290
291
|
this.$http.sendRequest('/cereMessage/viewMessage', 'POST',{...info,messageType:'物业缴费通知'},1).then(res => {
let obj = res.data.data
for(let prop in obj) {
if(obj.hasOwnProperty(prop)) { // 确保只访问实例上的属性,不包括继承的
obj[prop][0].content = JSON.parse(obj[prop][0].content)
this.wylist.push(obj[prop][0])
}
}
this.wylist.reverse()
|
f43899da
wesley88
1
|
292
293
294
295
296
297
298
299
300
301
302
303
|
if(this.wylist.length == 0){
this.$http.sendRequest('/cereMessage/viewMessage', 'POST',{...info1,messageType:'物业缴费通知'},1).then(res => {
let obj = res.data.data
for(let prop in obj) {
if(obj.hasOwnProperty(prop)) { // 确保只访问实例上的属性,不包括继承的
obj[prop][0].content = JSON.parse(obj[prop][0].content)
this.wylist.push(obj[prop][0])
}
}
this.wylist.reverse()
})
}
|
06dc87e6
wesley88
1
|
304
|
})
|
61e1439e
wesley88
1
|
305
|
},
|
844aa73a
杨鑫
'最新'
|
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
|
formatDateTime(dateTimeString) {
// 将输入的日期时间字符串转换为Date对象
const inputDate = new Date(dateTimeString);
const now = new Date();
// 获取年、月、日来进行比较
const inputYear = inputDate.getFullYear();
const inputMonth = inputDate.getMonth();
const inputDay = inputDate.getDate();
const currentYear = now.getFullYear();
const currentMonth = now.getMonth();
const currentDay = now.getDate();
// 检查输入的日期是否为今天
const isToday = (inputYear === currentYear) && (inputMonth === currentMonth) && (inputDay === currentDay);
// 格式化时间为HH:mm
const hours = inputDate.getHours().toString().padStart(2, '0');
const minutes = inputDate.getMinutes().toString().padStart(2, '0');
const timeString = `${hours}:${minutes}`;
// 如果是今天,则在时间前面加上'今天'
return isToday ? `今天${timeString}` : timeString;
},
|
e5b57447
杨鑫
'分包问卷'
|
331
|
getALL(){
|
3c4666ce
杨鑫
'最新'
|
332
|
// this.pagesize.receiverMerchant = uni.getStorageSync('user').phone
|
e5b57447
杨鑫
'分包问卷'
|
333
|
this.$http.sendRequest('/cereMessageNotification/queryByPage','POST',this.pagesize,1).then(res => {
|
65478d1d
杨鑫
'最新'
|
334
|
|
e5b57447
杨鑫
'分包问卷'
|
335
336
337
338
339
340
341
342
|
this.tableList =res.data.data.content
})
},
toDialogue(){
uni.navigateTo({
url:'/pages/dialogue/dialogue'
})
},
|
61e1439e
wesley88
1
|
343
344
345
346
347
|
gopath(e) {
uni.navigateTo({
url:e
})
},
|
e5b57447
杨鑫
'分包问卷'
|
348
349
|
toMsgList(){
uni.navigateTo({
|
844aa73a
杨鑫
'最新'
|
350
|
url:'/pages/procedureList/procedureList'
|
e5b57447
杨鑫
'分包问卷'
|
351
352
|
})
},
|
844aa73a
杨鑫
'最新'
|
353
|
|
3f535f30
杨鑫
'初始'
|
354
355
356
357
358
359
360
|
}
}
</script>
<style scoped lang="scss">
@import 'message.scss';
</style>
|