|
@ -7,7 +7,7 @@ |
|
|
<div class="flex-1 flex-column"> |
|
|
<div class="flex-1 flex-column"> |
|
|
<Location :title="defaultTitle" /> |
|
|
<Location :title="defaultTitle" /> |
|
|
<div class="content-detail p-4" :style="{ 'min-height': list.children.length * 56 + 'px' }"> |
|
|
<div class="content-detail p-4" :style="{ 'min-height': list.children.length * 56 + 'px' }"> |
|
|
<template v-if="code.length === 6 && (code === '060101' || code === '060503')"> |
|
|
<template v-if="code.length === 6 && (code === '060101' || code === '060503') && !introId"> |
|
|
<RichText :rich-obj="content" /> |
|
|
<RichText :rich-obj="content" /> |
|
|
</template> |
|
|
</template> |
|
|
<ListPage v-else :code="code" @changeYear="changeYear" :content="content" @getData="getNumData" /> |
|
|
<ListPage v-else :code="code" @changeYear="changeYear" :content="content" @getData="getNumData" /> |
|
@ -103,6 +103,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
year: '2022', |
|
|
year: '2022', |
|
|
pageNum: 1, |
|
|
pageNum: 1, |
|
|
|
|
|
introId: '', |
|
|
content: {}, |
|
|
content: {}, |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
@ -116,12 +117,19 @@ export default { |
|
|
} else { |
|
|
} else { |
|
|
this.getContentData(this.code); |
|
|
this.getContentData(this.code); |
|
|
} |
|
|
} |
|
|
|
|
|
this.content = {}; |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
this.code = this.$route.query.code; |
|
|
this.code = this.$route.query.code; |
|
|
|
|
|
console.log('this.$route.query: ', this.$route.query); |
|
|
this.getDetault(this.code); |
|
|
this.getDetault(this.code); |
|
|
|
|
|
if (this.$route.query.introId) { |
|
|
|
|
|
console.log('this.$route.query.introId: ', this.$route.query.introId); |
|
|
|
|
|
this.introId = this.$route.query.introId; |
|
|
|
|
|
this.getIntroContent(); |
|
|
|
|
|
} |
|
|
if (this.code.length === 6 && (this.code === '060101' || this.code === '060503')) { |
|
|
if (this.code.length === 6 && (this.code === '060101' || this.code === '060503')) { |
|
|
this.getContentData(this.code); |
|
|
this.getContentData(this.code); |
|
|
} else { |
|
|
} else { |
|
@ -130,6 +138,22 @@ export default { |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
...mapActions('home', ['getDetail', 'getContent']), |
|
|
...mapActions('home', ['getDetail', 'getContent']), |
|
|
|
|
|
// 获取文章信息 |
|
|
|
|
|
async getIntroContent() { |
|
|
|
|
|
try { |
|
|
|
|
|
this.showLoading = true; |
|
|
|
|
|
const param = { |
|
|
|
|
|
showPage: '', |
|
|
|
|
|
introId: this.introId, |
|
|
|
|
|
}; |
|
|
|
|
|
const data = await this.getDetail(param); |
|
|
|
|
|
this.showLoading = false; |
|
|
|
|
|
this.content = data || {}; |
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
this.showLoading = false; |
|
|
|
|
|
console.error('error: ', error); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
// 获取默认显示标题 |
|
|
// 获取默认显示标题 |
|
|
getDetault(val) { |
|
|
getDetault(val) { |
|
|
for (let i = 0; i < this.list.children.length; i++) { |
|
|
for (let i = 0; i < this.list.children.length; i++) { |
|
|