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 5c43bcc commit 46ede5f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
9 changes: 5 additions & 4 deletions src/views/information/contents-list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
v-model="select"
value="headerFollow"
checked
@click="getFollows(store.getUserId())"
@click="getFollows(props.SendContentMsg.userId)"
>
<label for="headerFollow">关注</label>
</li>
Expand All @@ -64,7 +64,7 @@
id="fans"
value="fans"
v-model="select"
@click="getFans(store.getUserId())"
@click="getFans(props.SendContentMsg.userId)"
>
<label for="fans">粉丝</label>
</li>
Expand All @@ -80,7 +80,7 @@
<img :src="user.url" alt="">
</div>
<div class="user">
<p>{{ user.name }}</p>
<p @click="enterUser(user.userId)">{{ user.name }}</p>
<p>{{ user.description}}</p>
</div>
<div v-if="store.getUserLongToken()">
Expand Down Expand Up @@ -181,7 +181,7 @@ import {
} from "@/views/information/utils";
import {useStore} from "@/store";
import type {Post, User} from "@/utils/type";
import {followUser, splitContents, unFollowUser} from "@/utils/utils";
import {enterUser, followUser, splitContents, unFollowUser} from "@/utils/utils";
import {enterPost} from "@/views/posts/utils";
import router from "@/router";
Expand Down Expand Up @@ -411,6 +411,7 @@ const getFans = async(userId: string) => {
margin-right: 10px;
p {
cursor: pointer;
margin: 0;
padding: 0;
}
Expand Down
5 changes: 4 additions & 1 deletion src/views/posts/post.vue
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,12 @@ const renderMarkdown = (md: string | undefined) => {
const changePost = async (nowPostId: string) => {
postId.value = nowPostId
enterPost(nowPostId)
await enterPost(nowPostId)
postDetail.value = await getPostDetail(nowPostId)
postList.value = await getPostRecommendByPostId(nowPostId)
PostData.value.PostId = postId.value
PostData.value.UserId = postDetail.value?.author.userId as string
PostData.value.CommentCount = postDetail.value?.commentCount as number
renderMarkdown(postDetail?.value?.text)
}
Expand Down
4 changes: 2 additions & 2 deletions src/views/posts/posts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ const getHotPostList = async () => {
viewCount: post.viewCount,
userName: post.userName
}))
totalPost.value = 100
totalPost.value = 10
})
return postList.value
}
Expand All @@ -455,7 +455,7 @@ const getRecommendPostList = async () => {
liked: post.liked,
userName: post.userName
}))
totalPost.value = 100
totalPost.value = 10
})
return postList.value
}
Expand Down

0 comments on commit 46ede5f

Please sign in to comment.