Files
dvcp_v2_wechat_app/src/mods/publicity/AppContent/contentDetail.vue

59 lines
1.1 KiB
Vue
Raw Normal View History

2022-02-14 17:25:54 +08:00
<template>
<section class="contentDetail">
2022-02-23 14:13:59 +08:00
<AiDetail :detail="detail" :props="props"/>
2022-05-25 17:04:52 +08:00
<u-gap height="16"/>
<AiComment v-if="detail.id" :bid="detail.id"/>
2022-02-14 17:25:54 +08:00
</section>
</template>
<script>
2022-05-25 17:04:52 +08:00
import AiComment from "dvcp-wui/AiComment/AiComment";
2022-02-14 17:25:54 +08:00
export default {
name: "contentDetail",
2022-05-25 17:04:52 +08:00
components: {AiComment},
appName: "内容详情",
2022-02-14 17:25:54 +08:00
data() {
return {
detail: {title: "内容详情"},
props: {
count: "viewCount"
},
id: "",
}
},
onLoad({id}) {
if (id) {
this.id = id;
this.getDetail(id);
}
},
methods: {
getDetail(id) {
this.$instance.post(`/app/appcontentinfo/queryDetailById`, null, {
params: {id}
}).then(res => {
if (res?.data) {
this.detail = res.data
}
})
},
},
onShareAppMessage() {
return {
2022-02-23 15:16:23 +08:00
title: this.detail.title,
2022-02-14 17:25:54 +08:00
path: '/mods/AppContent/contentDetail?id=' + this.id
};
2022-05-25 17:04:52 +08:00
},
onReachBottom() {
uni.$emit("moreComments")
2022-02-14 17:25:54 +08:00
}
}
</script>
<style lang="scss" scoped>
.contentDetail {
}
</style>