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
| <template>
| <div class="box">
| <!-- <p>{{ this.$route.query.id }}</p> -->
| <div class="header">
| <h2>{{ title }}</h2>
| <p>发布日期:{{ releaseTime }} 点击量:[ {{(hits+1)/2}} ]</p>
| </div>
| <hr>
| <div v-html="content" class="ql-editor"></div>
| </div>
| </template>
| <script>
| import {getnew} from '../../api/api'
| export default {
| name:'noticeMessage',
| data(){
| return {
| content:'',
| hits:'',
| releaseTime:'',
| title:''
| }
| },
| created(){
| // console.log(">>>>>>>>",this.$route.query.id);
| this.getalone();
| },
| methods:{
| getalone(){
| const data = this.$route.query.id;
| getnew(data).then(res => {
| console.log(res);
| this.content = res.data.content;
| this.hits = res.data.hits;
| this.releaseTime = res.data.releaseTime;
| this.title = res.data.title;
| })
| },
| },
| }
| </script>
| <style>
| .box {
| width: 1200px;
| margin: 0 auto;
| }
| .header h2{
| color: rgb(3, 73, 144);
| text-align: center;
| }
| .header p{
| background-color: rgb(246, 246, 246);
| text-align: center;
| height: 35px;
| line-height: 35px;
| }
| .ql-editor{
| padding: 12px 0px !important;
| }
| .ql-editor img{
| width: 600px;
| height: 400px;
| }
| </style>
|
|