Commit afc48ef5 by lijiabin

【需求 21402】 feat: 完成楼层显示

parent 5d676393
......@@ -20,7 +20,7 @@ import type {
UpdateArticleRecommendAndSortDto,
} from './types'
import type { BackendServicePageResult, PageSearchParams } from '@/utils/request/types'
import { SpecificVideoRewardEnum } from '@/constants'
import { SpecificVideoRewardEnum, BooleanFlag } from '@/constants'
// 文章相关的接口(帖子 视频 实践等)
......@@ -379,3 +379,14 @@ export const topOrCancelTopComment = (commentId: number) => {
method: 'POST',
})
}
/**
* 获取可@的用户列表
*/
export const getAtUserList = (data: { findType?: BooleanFlag; findValue?: string }) => {
return service.request<string[]>({
url: `/api/auth/getUserInfo`,
method: 'POST',
data,
})
}
......@@ -368,6 +368,7 @@ export interface CommentItemDto {
isExpand: boolean
childNum: number
imgUrl: string
floorNumber: number
}
/**
......
......@@ -121,6 +121,12 @@
></span>
置顶评论
</span>
<span
v-if="!isQuestion"
class="inline-flex items-center rounded-full border border-gray-200 bg-gray-50 px-1.5 py-0.5 text-xs leading-none text-gray-500"
>
{{ item.floorNumber || '顶' }}楼
</span>
</div>
<!-- 作者有权利置顶 并且不是问吧(问吧是获取的二级评论列表) -->
<button
......
......@@ -266,7 +266,8 @@
</div>
<!-- 3. 回答列表 -->
<div class="space-y-3">
<div class="space-y-3" v-loading="commentLoading">
<div
v-for="(answer, index) in list"
:ref="(el) => (answerRefList[index] = el as HTMLElement)"
......@@ -297,6 +298,11 @@
></span>
置顶回答
</span>
<span
class="inline-flex items-center rounded-full border border-gray-200 bg-gray-50 px-1.5 py-0.5 text-11px leading-none text-gray-500"
>
{{ answer.floorNumber || '顶' }}楼
</span>
</div>
</div>
</div>
......@@ -482,7 +488,14 @@ const getQuestionDetail = async () => {
questionDetail.value = data
}
const { list, total, searchParams, goToPage, refresh } = usePageSearch(getCommentList, {
const {
list,
total,
searchParams,
goToPage,
refresh,
loading: commentLoading,
} = usePageSearch(getCommentList, {
// immediate: false,
defaultParams: {
articleId: questionId,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment