[update] 消息详情只展示动态消息详情
This commit is contained in:
@@ -3,12 +3,13 @@
|
||||
<van-overlay :show="loading" :z-index="99999">
|
||||
<van-loading />
|
||||
</van-overlay>
|
||||
<div v-if="!isDynamic">
|
||||
<p class="message-page-title">{{ title }}</p>
|
||||
<p class="message-page-sub-title">发布时间:{{ model.sendTime }}</p>
|
||||
<div class="message-page-content" v-html="model.msgContent"></div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<!-- <div v-if="!isDynamic">-->
|
||||
<!-- <p class="message-page-title">{{ title }}</p>-->
|
||||
<!-- <p class="message-page-sub-title">发布时间:{{ model.sendTime }}</p>-->
|
||||
<!-- <div class="message-page-content" v-html="model.msgContent"></div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div v-else>-->
|
||||
<div>
|
||||
<p class="message-page-title">【动态详情】{{ model.dynamicHeading }}</p>
|
||||
<div class="message-page-sub-title">
|
||||
<!--浏览量-->
|
||||
@@ -36,7 +37,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getMsgDetail } from '@/api/api'
|
||||
// import { getMsgDetail } from '@/api/api'
|
||||
import { getDynamicMessageById } from '@/api/standardRegulationLibraryApi'
|
||||
import FileDisplay from '@/components/FileDisplay'
|
||||
|
||||
@@ -58,29 +59,9 @@ export default {
|
||||
// 获取消息详情
|
||||
initPage () {
|
||||
this.loading = true
|
||||
getMsgDetail({ id: this.$route.query.id }).then(res => {
|
||||
if (res.success) {
|
||||
const data = res.result || {}
|
||||
if (data.openType === 'url' && data.openPage.includes('/standardRegulationLibrary/DynamicMessageDetail')) {
|
||||
this.isDynamic = true
|
||||
// 是动态消息,获取动态消息详情
|
||||
this.initDynamicDetail(data.openPage)
|
||||
} else {
|
||||
this.model = data
|
||||
this.title = data.titile
|
||||
this.loading = false
|
||||
}
|
||||
} else {
|
||||
this.$message(res.message)
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取动态消息详情
|
||||
initDynamicDetail (openPage) {
|
||||
const id = openPage.split('=')[1]
|
||||
getDynamicMessageById({ id: id, type: 'query' }).then(res => {
|
||||
getDynamicMessageById({ id: this.$route.query.id, type: 'query' }).then(res => {
|
||||
if (res.success) {
|
||||
this.isDynamic = true
|
||||
this.model = Object.assign({}, res.result || {})
|
||||
} else {
|
||||
this.$message(res.message)
|
||||
@@ -89,6 +70,39 @@ export default {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
// initPage () {
|
||||
// this.loading = true
|
||||
// getMsgDetail({ id: this.$route.query.id }).then(res => {
|
||||
// if (res.success) {
|
||||
// const data = res.result || {}
|
||||
// if (data.openType === 'url' && data.openPage.includes('/standardRegulationLibrary/DynamicMessageDetail')) {
|
||||
// this.isDynamic = true
|
||||
// // 是动态消息,获取动态消息详情
|
||||
// this.initDynamicDetail(data.openPage)
|
||||
// } else {
|
||||
// this.model = data
|
||||
// this.title = data.titile
|
||||
// this.loading = false
|
||||
// }
|
||||
// } else {
|
||||
// this.$message(res.message)
|
||||
// this.loading = false
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
// 获取动态消息详情
|
||||
// initDynamicDetail (openPage) {
|
||||
// const id = openPage.split('=')[1]
|
||||
// getDynamicMessageById({ id: id, type: 'query' }).then(res => {
|
||||
// if (res.success) {
|
||||
// this.model = Object.assign({}, res.result || {})
|
||||
// } else {
|
||||
// this.$message(res.message)
|
||||
// }
|
||||
// }).finally(() => {
|
||||
// this.loading = false
|
||||
// })
|
||||
// }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user