index.vue
998 Bytes
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
<template>
<view class="messageDetail-v u-p-l-32 u-p-r-32">
<view class="u-flex-col u-p-t-10 u-p-b-10 u-border-bottom">
<text class="u-m-b-10 u-font-32">{{info.title}}</text>
<text class="releaseUser u-m-t-10 u-font-24 u-p-b-10">{{info.creatorUser}}</text>
</view>
<view class="messageDetail-content u-p-t-20 u-p-b-20">
<u-parse :html="info.bodyText" selectable :tag-style="style"></u-parse>
</view>
</view>
</template>
<script>
import {
getMessageDetail
} from '@/api/message.js'
export default {
data() {
return {
info: {},
style: {
ul: 'padding:0',
li: 'list-style-type:none,padding:0'
}
}
},
onLoad(option) {
this.initDetail(option.id)
},
methods: {
initDetail(id) {
getMessageDetail(id).then(res => {
uni.setNavigationBarTitle({
title: res.data.title
});
this.info = res.data;
})
}
}
}
</script>
<style lang="scss">
.messageDetail-v {
.releaseUser {
color: #9A9A9A;
}
}
</style>