consultationDetails.vue
1.3 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
<template>
<view class="">
<view class="mainBox">
<view class="title">{{detail.title}}</view>
<view class="timenev flexD">
<view class="time">
发布时间{{detail.publishtime}}
</view>
<image src="../../static/ic_fenxiang.png" mode=""></image>
</view>
<rich-text :nodes="detail.content"></rich-text>
</view>
</view>
</template>
<script>
import {
arc_detail
} from '@/api/index.js'
export default {
data() {
return {
id: "",
detail: {
title: "",
publishtime: "",
content: "",
}
}
},
onLoad(options) {
this.id = options.id
this.arc_detail()
},
methods: {
//详情
async arc_detail() {
try {
const res = await arc_detail(this.id)
this.detail = res.detail
console.log('arc_detail', res)
// 保存数据
} catch (err) {
uni.showToast({
title: err,
icon: 'none'
})
console.log('arc_detail', err)
}
},
}
}
</script>
<style lang="less">
.mainBox {
padding: 24rpx 31rpx;
.timenev {
margin-top: 20rpx;
color: rgba(179, 179, 179, 1);
font-size: 24rpx;
font-weight: 400;
font-family: "PingFang SC";
image {
width: 40rpx;
height: 40rpx;
}
}
}
</style>