|
|
@ -8,6 +8,7 @@ |
|
|
|
<Location :title="defaultTitle" /> |
|
|
|
<div class="content-detail p-4" :style="{ 'min-height': list.children.length * 56 + 'px' }"> |
|
|
|
<ListPage v-if="!introId" :code="code" @changeYear="changeYear" :content="content" @getData="getData" /> |
|
|
|
<RichText v-else :rich-obj="introContent" /> |
|
|
|
</div> |
|
|
|
<div v-if="introContent.relations && introContent.relations.length" class="content-detail p-4"> |
|
|
|
<Relevant :data="introContent" /> |
|
|
@ -24,9 +25,10 @@ import LeftNav from '@/components/LeftNav/LeftNav.vue'; |
|
|
|
import Location from '@/components/Location/Location.vue'; |
|
|
|
import ListPage from '@/components/ListPage/ListPage.vue'; |
|
|
|
import Relevant from '@/components/RichText/Relevant.vue'; |
|
|
|
import RichText from '@/components/RichText/RichText.vue'; |
|
|
|
|
|
|
|
export default { |
|
|
|
components: { LeftNav, ListPage, Relevant, Location }, |
|
|
|
components: { LeftNav, ListPage, Relevant, Location, RichText }, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
code: '0801', |
|
|
@ -92,8 +94,9 @@ export default { |
|
|
|
if (this.$route.query.introId) { |
|
|
|
this.introId = this.$route.query.introId; |
|
|
|
this.getIntroContent(); |
|
|
|
} else { |
|
|
|
this.getContentData(); |
|
|
|
} |
|
|
|
this.getContentData(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
...mapActions('home', ['getContent', 'getDetail']), |
|
|
@ -145,6 +148,7 @@ export default { |
|
|
|
}; |
|
|
|
const data = await this.getDetail(param); |
|
|
|
this.introContent = data || {}; |
|
|
|
console.log('this.introContent: ', this.introContent); |
|
|
|
} catch (error) { |
|
|
|
console.error('error: ', error); |
|
|
|
} |
|
|
|