questionDetails.vue
671 字节
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
<template>
<view class="">
<rich-text :nodes="detail"></rich-text>
</view>
</template>
<script>
import { problemDetail } from '@/api/mine.js'
export default {
data() {
return {
detail: '',
id:''
}
},
onLoad(e) {
this.id = e.id
this.problemDetail()
},
methods: {
async problemDetail(){
try {
const res = await problemDetail(this.id)
this.detail = res.detail.content
console.log('problemDetail', res)
// 保存数据
} catch (err) {
uni.showToast({ title:err,icon:'none' })
console.log('problemDetail', err)
}
},
},
}
</script>
<style>
</style>