newsDetails.vue
1.96 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
84
85
86
87
88
89
90
91
92
93
94
95
96
<template>
<view class="ConCss">
<u-navbar v-if="!$isDing" class="navBarCss" title="资讯详情" :titleStyle="{'fontSize':'36rpx','color':'#333333','fontWeight':'700'}"
leftClick="leftClick" :autoBack="true" safeAreaInsetTop placeholder />
<view class="titleCss">
{{ detailsContent.title }}
</view>
<view class="releaseTimeCss">
发布时间:{{ $u.timeFormat(detailsContent.publishTime,'yyyy年mm月dd日 hh:MM:ss') || ""}}
</view>
<rich-text :nodes="detailsContent.details">
</rich-text>
</view>
</template>
<script>
import {
getInfoMarketInformationDetail
} from '@/api/infoMarketInformation.js'
export default {
components: {},
props: {
},
data() {
return {
detailsContent: {},
id: "",
}
},
computed: {
},
onLoad(data) {
if (data.id) {
this.id = data.id;
}
this.initData();
},
methods: {
initData() {
getInfoMarketInformationDetail(this.id).then((res) => {
this.detailsContent = res.data;
})
},
leftClick() {
console.log('leftClick');
},
}
}
</script>
<style lang="scss" scoped>
.ConCss {
padding: 0 30rpx;
}
.navBarCss {
font-family: '苹方 粗体', '苹方 中等', '苹方', sans-serif
}
.titleCss {
background-color: rgba(255, 255, 255, 0);
box-sizing: border-box;
font-family: '苹方 粗体', '苹方 中等', '苹方', sans-serif;
font-weight: 700;
color: #333333;
text-align: left;
line-height: normal;
font-size: 40rpx;
margin: 26rpx 0;
}
.releaseTimeCss {
height: 32px;
background-color: rgba(255, 255, 255, 0);
box-sizing: border-box;
font-family: '苹方 中等', '苹方', sans-serif;
color: #999db0;
text-align: left;
line-height: normal;
font-size: 24rpx;
}
img {
width: 100%;
height: 100%;
margin: 20rpx 0;
}
p {
line-height: 200%;
}
</style>