diff --git a/src/common/lang/en-us.js b/src/common/lang/en-us.js index e8eaa2c8..4a14d450 100644 --- a/src/common/lang/en-us.js +++ b/src/common/lang/en-us.js @@ -501,6 +501,7 @@ module.exports = { message: { // 我的消息 my: { + myMessage: 'My Message', title: 'title', publisher: 'publisher', readingStatus: 'readingStatus', diff --git a/src/common/lang/zh-cn.js b/src/common/lang/zh-cn.js index 333253a4..d589c9f1 100644 --- a/src/common/lang/zh-cn.js +++ b/src/common/lang/zh-cn.js @@ -531,6 +531,7 @@ module.exports = { message: { // 我的消息 my: { + myMessage: '我的消息', title: '标题', publisher: '发布人', readingStatus: '阅读状态', diff --git a/src/views/system/UserAnnouncementDetail.vue b/src/views/system/UserAnnouncementDetail.vue index 9c016faa..2b4220d7 100644 --- a/src/views/system/UserAnnouncementDetail.vue +++ b/src/views/system/UserAnnouncementDetail.vue @@ -1,6 +1,16 @@ @@ -12,9 +22,8 @@ export default { components: { InternalDetailPage }, data () { return { - title: '', loading: false, - data: {} + model: {} } }, created () { @@ -22,14 +31,46 @@ export default { }, methods: { initPage () { - getMsgDetail({ ids: this.$route.query.id }).then(res => { - this.data = res + this.loading = true + getMsgDetail({ id: this.$route.query.id }).then(res => { + if (res.success) { + const data = res.result || {} + this.model = data + this.title = data.titile + } else { + this.$message.warn(res.message) + } + }).catch((err) => { + this.$message.warn(err) + }).finally(() => { + this.loading = false }) } } } -