47 lines
1.1 KiB
Vue
47 lines
1.1 KiB
Vue
<template>
|
|
<view class="min-height bg-main-light">
|
|
<HeaderItem title="详情"/>
|
|
<template v-if="info">
|
|
<view class="bg-white p-30">
|
|
<view class="font-bold text-25">{{ info.title }}</view>
|
|
<view class="text-25 text-gray mt-20">{{ info.createTime }}</view>
|
|
</view>
|
|
<view class="card m-25">
|
|
<u-parse :content="info.content"/>
|
|
</view>
|
|
</template>
|
|
<view class="footer bg-linear text-white text-center" v-if="showFeedback" @click="$jump('/articlePages/pages/feedback')">
|
|
<view class="p-30">我要反馈</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import {articleInfoReq} from "@/api/common";
|
|
import HeaderItem from "@/components/HeaderItem.vue";
|
|
|
|
export default {
|
|
name: "info",
|
|
components: {HeaderItem},
|
|
data() {
|
|
return {
|
|
info: null,
|
|
showFeedback: false,
|
|
}
|
|
},
|
|
methods: {
|
|
async getInfo(articleId) {
|
|
const {data} = await articleInfoReq({
|
|
articleId
|
|
})
|
|
this.info = data
|
|
}
|
|
},
|
|
onLoad({id, showFeedback}) {
|
|
this.getInfo(id)
|
|
if (showFeedback) {
|
|
this.showFeedback = parseInt(showFeedback) === 1
|
|
}
|
|
}
|
|
}
|
|
</script> |