|
|
@ -1,6 +1,14 @@ |
|
|
|
<template> |
|
|
|
<div class="content-main introduction-main"> |
|
|
|
<div class="new-detial-info" v-html="rawHtml" /> |
|
|
|
<div v-if="detailData" class="detail-info new-detial-info"> |
|
|
|
<h2 class="detail-title">{{ detailData.overTitle }}</h2> |
|
|
|
<div style="display: flex; justify-content: center; align-items: center; margin-bottom: 20px;"> |
|
|
|
<p>来源:{{ detailData.source ? detailData.source :'-' }}</p> |
|
|
|
<p style="margin:0 10px;">作者:{{ detailData.author? detailData.author :'-' }}</p> |
|
|
|
<p>责编:{{ detailData.editor ? detailData.editor : '-' }}</p> |
|
|
|
</div> |
|
|
|
<div class="detail-content" v-html="detailData.introHtml" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
@ -10,7 +18,8 @@ export default { |
|
|
|
name: 'ImgTxtDetail', |
|
|
|
data() { |
|
|
|
return { |
|
|
|
rawHtml: '' |
|
|
|
rawHtml: '', |
|
|
|
detailData: {} |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
@ -41,9 +50,9 @@ export default { |
|
|
|
FetchInitQueryTopicContext(params).then(res => { |
|
|
|
console.log(res) |
|
|
|
if (res && res.content.length > 0) { |
|
|
|
this.rawHtml = res.content[0].introHtml |
|
|
|
this.detailData = res.content[0] |
|
|
|
} else { |
|
|
|
this.rawHtml = '暂无数据' |
|
|
|
this.detailData = {} |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.$message.error('接口错误') |
|
|
@ -55,5 +64,26 @@ export default { |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
@import "~@/assets/styles/index.scss"; |
|
|
|
|
|
|
|
.detail-info{ |
|
|
|
.detail-title{ |
|
|
|
font-size: 32px; |
|
|
|
font-family: Source Han Sans CN-Regular, Source Han Sans CN; |
|
|
|
font-weight: 400; |
|
|
|
color: #333333; |
|
|
|
line-height: 100px; |
|
|
|
text-align: center; |
|
|
|
} |
|
|
|
.detail-content{ |
|
|
|
::v-deep p{ |
|
|
|
span{ |
|
|
|
display: block !important; |
|
|
|
text-indent:2em !important; |
|
|
|
} |
|
|
|
img{ |
|
|
|
display: block; |
|
|
|
margin: 10px auto; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |