From 41cda3f4a82fb46779b9b913c2f5e1dbc77042ca Mon Sep 17 00:00:00 2001 From: linfeng Date: Fri, 2 Jun 2023 16:28:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8A=9F=E8=83=BD=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/admin/comment-add-or-update.vue | 25 ++++++++++- .../modules/admin/post-add-or-update.vue | 43 ++++++++++++++++++- 2 files changed, 64 insertions(+), 4 deletions(-) diff --git a/src/main/resources/static/linfeng-community-vue/src/views/modules/admin/comment-add-or-update.vue b/src/main/resources/static/linfeng-community-vue/src/views/modules/admin/comment-add-or-update.vue index 9c02c0c..27589ee 100644 --- a/src/main/resources/static/linfeng-community-vue/src/views/modules/admin/comment-add-or-update.vue +++ b/src/main/resources/static/linfeng-community-vue/src/views/modules/admin/comment-add-or-update.vue @@ -22,7 +22,14 @@ visible: false, dataForm: { id: 0, - content: '' + pid: '', + type: '', + uid: '', + toUid: '', + postId: '', + content: '', + status: '', + createTime: '' }, dataRule: { status: [ @@ -44,7 +51,14 @@ params: this.$http.adornParams() }).then(({data}) => { if (data && data.code === 0) { + this.dataForm.pid = data.comment.pid + this.dataForm.type = data.comment.type + this.dataForm.uid = data.comment.uid + this.dataForm.toUid = data.comment.toUid + this.dataForm.postId = data.comment.postId this.dataForm.content = data.comment.content + this.dataForm.status = data.comment.status + this.dataForm.createTime = data.comment.createTime } }) } @@ -59,7 +73,14 @@ method: 'post', data: this.$http.adornData({ 'id': this.dataForm.id || undefined, - 'content': this.dataForm.content + 'pid': this.dataForm.pid, + 'type': this.dataForm.type, + 'uid': this.dataForm.uid, + 'toUid': this.dataForm.toUid, + 'postId': this.dataForm.postId, + 'content': this.dataForm.content, + 'status': this.dataForm.status, + 'createTime': this.dataForm.createTime }) }).then(({data}) => { if (data && data.code === 0) { diff --git a/src/main/resources/static/linfeng-community-vue/src/views/modules/admin/post-add-or-update.vue b/src/main/resources/static/linfeng-community-vue/src/views/modules/admin/post-add-or-update.vue index d3c3806..ca99e4b 100644 --- a/src/main/resources/static/linfeng-community-vue/src/views/modules/admin/post-add-or-update.vue +++ b/src/main/resources/static/linfeng-community-vue/src/views/modules/admin/post-add-or-update.vue @@ -34,8 +34,21 @@ export default { visible: false, dataForm: { id: 0, + uid: "", + topicId: "", + discussId: "", + voteId: "", + title: "", + content: "", + media: "", readCount: "", - postTop: "" + postTop: "", + type: "", + address: "", + longitude: "", + latitude: "", + createTime: "", + status: "", }, }; }, @@ -52,8 +65,21 @@ export default { params: this.$http.adornParams(), }).then(({ data }) => { if (data && data.code === 0) { + this.dataForm.uid = data.post.uid; + this.dataForm.topicId = data.post.topicId; + this.dataForm.discussId = data.post.discussId; + this.dataForm.voteId = data.post.voteId; + this.dataForm.title = data.post.title; + this.dataForm.content = data.post.content; + this.dataForm.media = data.post.media; this.dataForm.readCount = data.post.readCount; this.dataForm.postTop = data.post.postTop; + this.dataForm.type = data.post.type; + this.dataForm.address = data.post.address; + this.dataForm.longitude = data.post.longitude; + this.dataForm.latitude = data.post.latitude; + this.dataForm.createTime = data.post.createTime; + this.dataForm.status = data.post.status; } }); } @@ -70,8 +96,21 @@ export default { method: "post", data: this.$http.adornData({ id: this.dataForm.id || undefined, + uid: this.dataForm.uid, + topicId: this.dataForm.topicId, + discussId: this.dataForm.discussId, + voteId: this.dataForm.voteId, + title: this.dataForm.title, + content: this.dataForm.content, + media: this.dataForm.media, readCount: this.dataForm.readCount, - postTop: this.dataForm.postTop + postTop: this.dataForm.postTop, + type: this.dataForm.type, + address: this.dataForm.address, + longitude: this.dataForm.longitude, + latitude: this.dataForm.latitude, + createTime: this.dataForm.createTime, + status: this.dataForm.status, }), }).then(({ data }) => { if (data && data.code === 0) {