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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
| <template>
| <div class="message-table">
| <div v-if="!messageList" class="notice-tips">
| <div class="no-notice">
| <img src="../../assets/imgs/pic.png" alt="暂无消息">
| </div>
| <p class="tips">暂无消息</p>
| </div>
| </div>
| </template>
| <script>
| import { dateFormat } from 'vux';
| import { mapActions } from 'vuex';
| export default {
| name: 'message',
| data() {
| return {
| messageList: [],
| }
| },
| created() {
| this.msgListInit()
| this.getCount()
| },
| methods: {
| ...mapActions(['getCount']),
| //跳转到消息详情
| toMessageDetail(e, id) {
| this.$router.push(`/message?messageId=${id}`);
| },
| msgListInit() {
| this.$api.noticeList().then(res => {
| this.messageList = res.body.noticeInfos;
| })
| }
| }
| }
| </script>
| <style lang="less" scoped>
| .notice-tips{
| margin-top: 100px;
| }
| .no-notice{
| width: 186px;
| height: 186px;
| margin-left: 43px;
| img{
| width: 100%;
| height: 100%;
| }
| }
| .tips{
| color: #333333;
| margin-top: 10px;
| width: 100%;
| text-align: center;
| font-size: 14px;
| }
| .message-table{
| width: 100%;
| height: 100%;
| overflow: hidden;
| padding-bottom: 50px;
| }
| .message-table-item{
| width: 90%;
| margin: 0 2%;
| background: #fff;
| margin-top: 10px;
| padding: 10px 3%;
| &-top{
| margin-bottom: 10px;
| .flexLayout(space-between, center, row);
| :nth-child(1){
| font-size: 16px;
| color: #333333;
| font-weight: bold;
| width: 60%;
| overflow: hidden;
| text-overflow: ellipsis;
| white-space: nowrap;
| word-wrap: normal;
| i{
| font-size: 20px;
| color: #3D86FA;
| }
| }
| :nth-child(2){
| font-size: 12px;
| color: #999999;
| }
| }
| &-content{
| .flexLayout(space-between, center, row);
| p{
| // .ellipsisLn(290px);
| width: 90%;
| overflow: hidden;
| text-overflow: ellipsis;
| white-space: nowrap;
| word-wrap: normal;
| color: #666666;
| font-size: 13px;
| }
| span{
| width:7px;
| height:7px;
| background:rgba(255,102,102,1);
| border-radius:50%;
| }
| }
| }
| .notice-title{
| // color: #423D5D !important;
| }
| </style>
|
|