noticeDetail.vue
1.9 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<template >
<div style="background-color: #f7f8fa;">
<nav-bar>
<div slot="left" class="back" @click="goBack">
<img src="../../assets/img/back.png" alt="">
</div>
<div slot="center" class="userinfotitle">
消息通知
</div>
<div slot="right" class="result"></div>
</nav-bar>
<div class="containernotice">
<div class="noticeone display-flex">
<img src="../../assets/img/notice.png" alt="" class="noticeimg">
<div class="noticetext">
{{detail.content}}
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data () {
return {
id: '',
detail: ''
}
},
mounted () {
console.log(this.$route.query)
this.id = this.$route.query.id
this.getdetail()
},
methods: {
async getdetail () {
const params = {
id: this.id
}
const res = await this.api.getnoticedetail(params)
if (res.code === 1) {
this.detail = res.data.detail
}
},
goBack () {
this.$router.go(-1)
}
}
}
</script>
<style>
.containernotice{
width: 100%;
height: 100vh;
background: #f7f8fa;
padding:1rem 0.32rem;
box-sizing: border-box;
}
.noticeimg{
width:0.72rem;
height: 0.72rem;
margin-right: 0.16rem;
}
.noticeone{
align-items: flex-start;
}
.noticetext{
width: 5.42rem;
height: auto;
border-radius: 0.08rem;
opacity: 1;
background: rgba(255,255,255,1);
font-size: 0.3rem;
font-weight: 400;
font-family: "PingFang SC";
text-align: left;
line-height: 0.44rem;
padding: 0.24rem;
box-sizing: border-box;
word-break: break-all;
}
</style>