فهرست منبع

fix:1.修改我的评论的bug

suwenjiang 2 ماه پیش
والد
کامیت
db4c223854
1فایلهای تغییر یافته به همراه6 افزوده شده و 6 حذف شده
  1. 6 6
      src/pages/profile/my-comment.vue

+ 6 - 6
src/pages/profile/my-comment.vue

@@ -35,7 +35,7 @@
         <template v-for="item in commentList" :key="item?.id">
           <!-- <van-swipe-cell> -->
           <div
-            v-if="commentIndex == 0 || commentIndex == 1"
+            v-if="commentIndex == 0 || commentIndex == 2"
             style="scrollbar-width: none"
             class="mx-12 pt-8 mb-12 box-border border-b-[1px] border-dashed flex justify-between items-start"
           >
@@ -114,7 +114,7 @@
           </div>
 
           <div
-            v-if="commentIndex == 2"
+            v-if="commentIndex == 1"
             style="scrollbar-width: none"
             class="block mx-12 pt-8 mb-12 box-border border-b-[1px] border-dashed flex justify-between items-start"
           >
@@ -282,13 +282,13 @@ const commentItemRef = ref(null)
 // 评论的菜单列表
 const commentDropdownMenuList = [
   { text: '我的评论', value: 0 },
-  { text: '收到的评论', value: 1 },
-  { text: '发出的评论', value: 2 }
+  { text: '收到的评论', value: 2 },
+  { text: '发出的评论', value: 1 }
 ]
 
 function onCommentFilterClose(value) {
   commentIndex.value = value
-  document.title = value == 0 ? '我的评论' : value == 1 ? '收到的评论' : '发出的评论'
+  document.title = value == 0 ? '我的评论' : value == 1 ? '发出的评论' : '收到的评论'
   commentList.value = []
   getMyCommentList()
 }
@@ -449,7 +449,7 @@ async function addComment() {
     return
   }
   canAddComment.value = false
-  const body = { travelNoteId: replyComment.travelNoteId, commentContent: commentValue.value }
+  const body = { travelNoteId: replyComment.value.travelNoteId, commentContent: commentValue.value }
   if (replyComment.value.id) {
     body.replyCommentId = replyComment.value.id
     body.replyUserId = replyComment.value.createUserId