Files
dvcp_v2_wechat_app/src/mods/AppContent/contentDetail.vue
2022-02-15 15:38:20 +08:00

51 lines
841 B
Vue

<template>
<section class="contentDetail">
<ai-detail :detail="detail" :props="props"/>
</section>
</template>
<script>
export default {
name: "contentDetail",
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 {
title: detail.title,
path: '/mods/AppContent/contentDetail?id=' + this.id
};
}
}
</script>
<style lang="scss" scoped>
.contentDetail {
}
</style>