[update] 消息详情页的动态消息id改为调消息详情获取
This commit is contained in:
@@ -52,14 +52,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
console.log('-----------openPage', this.$route.query.openPage)
|
||||
if (this.$route.query.openType === 'url' && this.$route.query.openPage.includes('/standardRegulationLibrary/DynamicMessageDetail')) {
|
||||
this.isDynamic = true
|
||||
// 是动态消息,获取动态消息详情
|
||||
this.initDynamicDetail()
|
||||
} else {
|
||||
this.initPage()
|
||||
}
|
||||
this.initPage()
|
||||
},
|
||||
methods: {
|
||||
// 获取消息详情
|
||||
@@ -68,21 +61,24 @@ export default {
|
||||
getMsgDetail({ id: this.$route.query.id }).then(res => {
|
||||
if (res.success) {
|
||||
const data = res.result || {}
|
||||
this.model = data
|
||||
this.title = data.titile
|
||||
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
|
||||
}
|
||||
}).catch((err) => {
|
||||
this.$message(err)
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 获取动态消息详情
|
||||
initDynamicDetail () {
|
||||
this.loading = true
|
||||
const id = this.$route.query.openPage.split('=')[1]
|
||||
initDynamicDetail (openPage) {
|
||||
const id = openPage.split('=')[1]
|
||||
getDynamicMessageById({ id: id, type: 'query' }).then(res => {
|
||||
if (res.success) {
|
||||
this.model = Object.assign({}, res.result || {})
|
||||
|
||||
Reference in New Issue
Block a user