Files
dvcp_v2_webapp/packages/publicity/AppHotTopic/components/hotDetail.vue

156 lines
3.5 KiB
Vue
Raw Normal View History

2021-12-14 18:36:19 +08:00
<template>
<div class="hotDetail">
<ai-detail>
<template slot="title">
<ai-title title="热点话题详情" :isShowBack="true" :isShowBottomBorder="true"
@onBackClick="$emit('goBack')"></ai-title>
</template>
<template slot="content">
<ai-card title="标题信息">
<template slot="content">
<ai-wrapper label-width="70px" :columnsNumber="1">
2024-01-22 17:12:32 +08:00
<ai-info-item label="话题标题">{{ detailObj.title }}</ai-info-item>
2021-12-14 18:36:19 +08:00
<ai-info-item label="关键字" v-if="detailObj.keyWords">
<el-tag
2024-01-22 17:12:32 +08:00
v-for="tag in detailObj.keyWords.split(',')"
:key="tag"
effect="plain">
{{ tag }}
2021-12-14 18:36:19 +08:00
</el-tag>
</ai-info-item>
<ai-info-item label="封面图片">
<img :src="detailObj.thumbUrl" v-viewer
alt="">
</ai-info-item>
</ai-wrapper>
</template>
</ai-card>
<ai-card class="card" v-for="(item,index) in detailObj.contents" :key="index">
2024-01-22 17:12:32 +08:00
<template slot="title">{{ item.question }}</template>
<template slot="right">话题来源{{ item.questionSource }}</template>
2021-12-14 18:36:19 +08:00
<template slot="content">
<div class="wrap">
<header>
2024-01-22 17:12:32 +08:00
<b>{{ item.answerSource }}</b>&nbsp;&nbsp;回复
2021-12-14 18:36:19 +08:00
</header>
2024-01-22 17:12:32 +08:00
<p>{{ item.answer }}</p>
2021-12-14 18:36:19 +08:00
<div v-viewer>
<img :src="p.url"
v-for="(p,q) in item.files" :key="q" alt="">
</div>
</div>
</template>
</ai-card>
</template>
</ai-detail>
</div>
</template>
<script>
2024-01-22 17:12:32 +08:00
export default {
name: "hotDetail",
label: "热点详情",
props: {
instance: Function,
dict: Object,
permissions: Function,
areaId: String,
detail: Object
},
data() {
return {
detailObj: {},
2021-12-14 18:36:19 +08:00
}
2024-01-22 17:12:32 +08:00
},
methods: {
getDetail() {
this.instance.post(`/app/apphotsubject/detail`, null, {
params: {id: this.detail.id}
}).then(res => {
if (res && res.data) {
this.detailObj = res.data
}
})
},
},
created() {
this.getDetail()
2021-12-14 18:36:19 +08:00
}
2024-01-22 17:12:32 +08:00
}
2021-12-14 18:36:19 +08:00
</script>
<style lang="scss" scoped>
2024-01-22 17:12:32 +08:00
.hotDetail {
height: 100%;
overflow: hidden;
2021-12-14 18:36:19 +08:00
2024-01-22 17:12:32 +08:00
.card {
:deep( .aibar ) {
height: 94px !important;
flex-direction: column;
align-items: flex-start;
margin-bottom: 0px !important;
padding: 16px !important;
2021-12-14 18:36:19 +08:00
2024-01-22 17:12:32 +08:00
& > div {
line-height: 24px;
2021-12-14 18:36:19 +08:00
2024-01-22 17:12:32 +08:00
&:last-child {
font-size: 14px;
color: #888888;
2021-12-14 18:36:19 +08:00
}
}
2024-01-22 17:12:32 +08:00
}
2021-12-14 18:36:19 +08:00
2024-01-22 17:12:32 +08:00
:deep( .ai-card__body ) {
padding: 12px 20px 22px !important;
}
2021-12-14 18:36:19 +08:00
2024-01-22 17:12:32 +08:00
.wrap {
background-color: #F5F6F9;
box-sizing: border-box;
padding: 16px;
2021-12-14 18:36:19 +08:00
2024-01-22 17:12:32 +08:00
header {
height: 40px;
font-size: 16px;
color: #222222;
line-height: 24px;
display: flex;
align-items: center;
border-bottom: 1px solid #EEEEEE;
2021-12-14 18:36:19 +08:00
2024-01-22 17:12:32 +08:00
b {
color: #2266FF;
2021-12-14 18:36:19 +08:00
}
}
2024-01-22 17:12:32 +08:00
p {
margin-top: 16px;
font-size: 16px;
color: #222222;
line-height: 32px;
text-indent: 2em;
}
2021-12-14 18:36:19 +08:00
}
2024-01-22 17:12:32 +08:00
}
2021-12-14 18:36:19 +08:00
2024-01-22 17:12:32 +08:00
:deep( .el-tag) {
background: #F3F4F7;
border-radius: 2px;
color: #222222;
border: 1px solid #D0D4DC;
margin-right: 8px;
}
img {
width: 160px;
height: 160px;
border-radius: 2px;
margin-top: 16px;
margin-right: 8px;
2021-12-14 18:36:19 +08:00
}
2024-01-22 17:12:32 +08:00
}
2021-12-14 18:36:19 +08:00
</style>