notifyDetail.vue
1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<template>
<view class="notify-detail-page">
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<view class="notify-column">
<view class="u-flex column">
<text class="text">{{ notifyList.receiverName }}</text>
</view>
<view class="column-list">
<u-list height="140rpx">
<u-list-item>
<u-cell :value="`${notifyList.createTime}`" :title="`${notifyList.receiverName}`">
<u-avatar slot="icon" shape="circle" size="35" :src="avatar"></u-avatar>
</u-cell>
</u-list-item>
</u-list>
<view class="bottom-text">
<text class="text">{{ notifyList.receiverName }}</text>
</view>
</view>
</view>
<f-tabbar></f-tabbar>
</view>
</template>
<script>
import fTabbar from '@/components/module/f-tabbar/f-tabbar';
export default {
components: {
fTabbar
},
data() {
return {
notifyList: {},
avatar: ''
};
},
onLoad(e) {
// 隐藏原生的tabbar
uni.hideTabBar();
if (e.data !== null) {
let params = JSON.parse(e.data);
this.avatar = params.avatar;
this.loadData(params.id);
}
},
methods: {
loadData(e) {
uni.$u.http
.get(`/yt/noticeUser/${e}`)
.then(res => {
if (res) {
this.notifyList = res;
}
})
.catch(e => {
uni.$u.toast(e.data?.message);
});
}
}
};
</script>
<style lang="scss" scoped>
@import './static/notifyDetail.scss';
</style>