diff --git a/src/assets/bg_board.jpg b/src/assets/bg_board.jpg index 2df38f6e1..57b78a062 100644 Binary files a/src/assets/bg_board.jpg and b/src/assets/bg_board.jpg differ diff --git a/src/scripts/ProjectConfig.js b/src/scripts/ProjectConfig.js index d18cab427..af834b0a7 100644 --- a/src/scripts/ProjectConfig.js +++ b/src/scripts/ProjectConfig.js @@ -447,3 +447,7 @@ export const ProjectList = [ {value: 'bjd', label: '北交大'}, {value: 'urtss', label: '陪标项目'} ]; +export const ProjectPostIdMap = { + drts: 1, + bjd: 2 +}; diff --git a/src/views/newMap/displayNew/demon/messageBoard.vue b/src/views/newMap/displayNew/demon/messageBoard.vue index d6b74ff69..40df479a0 100644 --- a/src/views/newMap/displayNew/demon/messageBoard.vue +++ b/src/views/newMap/displayNew/demon/messageBoard.vue @@ -95,6 +95,8 @@ import unlike_icon from '@/assets/unlike.png'; import reply_icon from '@/assets/reply.png'; import delete_icon from '@/assets/delete.png'; import { superAdmin } from '@/router/index_APP_TARGET'; +import { getSessionStorage } from '@/utils/auth'; +import { ProjectPostIdMap } from '@/scripts/ProjectConfig'; export default { name: 'MessageBoard', data() { @@ -126,6 +128,10 @@ export default { }, superAdmin() { return this.$store.state.user.roles.includes(superAdmin); + }, + postId() { + const project = getSessionStorage('project'); + return ProjectPostIdMap[project]; } }, created() { @@ -157,7 +163,7 @@ export default { this.$message.error('留言内容不能为空!'); return; } - answerPost({postId: 1, content: this.content}).then(resp => { + answerPost({postId: this.postId, content: this.content}).then(resp => { this.pageNum = Math.ceil(resp.data / this.pageSize); this.handleCurrentChange(); this.content = ''; @@ -167,7 +173,7 @@ export default { }); }, handleCurrentChange() { - queryPostPaging(1, {pageSize: this.pageSize, pageNum: this.pageNum}).then(resp => { + queryPostPaging(this.postId, {pageSize: this.pageSize, pageNum: this.pageNum}).then(resp => { this.postCommentList = []; (resp.data.list || []).forEach(item => { const value = item.content.replace(/实操教学 --> 理论考试 - 联系方式 - 留言板 + 联系方式 + 留言板