From c809a13cac30f8a9a28d0189bc5708212e03f21c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?052004122=E6=B8=A9=E5=AE=B8=E6=9D=B0?= <734868971@qq.com> Date: Fri, 26 May 2023 19:46:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E7=AE=A1=E7=90=86=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- alpha/admin/pages/content/mustgo-post/edit.vue | 14 ++++++++++---- alpha/admin/pages/content/mustgo-user/edit.vue | 10 ++++++++-- .../cloudfunctions/fe-college-likePost/index.js | 8 +++++++- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/alpha/admin/pages/content/mustgo-post/edit.vue b/alpha/admin/pages/content/mustgo-post/edit.vue index 2831e35..caf8cea 100644 --- a/alpha/admin/pages/content/mustgo-post/edit.vue +++ b/alpha/admin/pages/content/mustgo-post/edit.vue @@ -5,19 +5,25 @@ - + + - + + - + - + + + + @@ -86,6 +89,9 @@ {text: '男', value: '男'}, {text: '女', value: '女'} ], + place: [ + {value:'福州大学',text:'福州大学'}, + ], types: [ {text: '学生', value: '644a64c228064a7587cd79bf'}, {text: '老师', value: '644a64d2e766bb0085e6048e'} diff --git a/alpha/admin/uniCloud-aliyun/cloudfunctions/fe-college-likePost/index.js b/alpha/admin/uniCloud-aliyun/cloudfunctions/fe-college-likePost/index.js index d7dd6e0..5026730 100644 --- a/alpha/admin/uniCloud-aliyun/cloudfunctions/fe-college-likePost/index.js +++ b/alpha/admin/uniCloud-aliyun/cloudfunctions/fe-college-likePost/index.js @@ -24,7 +24,7 @@ exports.main = async (event, context) => { owner_id:event.userId }) - const res4 = await message_table.add({ + const res5 = await message_table.add({ state:false, types:"点赞", content:"", @@ -49,6 +49,12 @@ exports.main = async (event, context) => { likes:res.data[0]["likes"] - 1, }) + const deleteMessage = await message_table.where({ + types:"点赞", + from_id:event.userId, + post_id:event.postId + }).remove() + const deleteLike = await like_table.doc(islike.data[0]["_id"]).remove() if(deleteLike.deleted === 1){ return { -- GitLab