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