Skip to content

Commit

Permalink
fix: 修复BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
Lansongxx committed Apr 16, 2024
1 parent f3276c5 commit 5c43bcc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
7 changes: 2 additions & 5 deletions src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export const enterUser = async (userId: string) => {

export const getUserRecommend = async (mainClassify: string, classifyNum: number) => {
const userList = ref<User[]>([])
await get(false, getRecommendUrl(mainClassify, classifyNum))
await get(false, getRecommendUrl(mainClassify, classifyNum) + `&limit=10`)
.then((res: any) => {
userList.value = res.recommends.users.map((user: any) => ({
userId: user.userId,
Expand Down Expand Up @@ -226,18 +226,15 @@ export const getPostRecommendByPostId = async (postId: string) => {
return postList.value
}



export const getLabelList = async(fatherId: string, key?: string) =>{
const labelList = ref<Label[]>([])
if(!key) key = ""
await get(false, `${GetTagListUrl}?fatherId=${fatherId}&key=${key}`).then((res: any) => {
await get(false, `${GetTagListUrl}?fatherId=${fatherId}&key=${key}&limit=20`).then((res: any) => {
labelList.value = res.labels.map((label: any) => ({
id: label.id,
value: label.value
}))
})
console.log(labelList.value)
return labelList.value
}

Expand Down
15 changes: 14 additions & 1 deletion src/views/posts/comment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,20 @@
<i class="iconfont icon-appreciate_light"></i>
<span>{{ reply.like }}</span>
</span>
<span
class="disagree"
v-if="!commentBlock.comment.commentRelation.hated"
@click="hateComment(commentBlock.comment)"
>
<i class="iconfont icon-oppose_light"></i>
</span>
<span
class="disagree-like"
v-if="commentBlock.comment.commentRelation.hated"
@click="unHateComment(commentBlock.comment)"
>
<i class="iconfont icon-oppose_light"></i>
</span>
<span
class="reply-btn"
@click="replyComment(
Expand Down Expand Up @@ -456,7 +470,6 @@ const submitComment = async (subjectId: string,rootId: string, fatherId: string,
margin-right: 3px;
}
}
}
.reply-item {
Expand Down

0 comments on commit 5c43bcc

Please sign in to comment.