Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
corporate-culture-qd
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王立鹏
corporate-culture-qd
Commits
afc48ef5
Commit
afc48ef5
authored
Apr 16, 2026
by
lijiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【需求 21402】 feat: 完成楼层显示
parent
5d676393
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
3 deletions
+34
-3
index.ts
src/api/article/index.ts
+12
-1
types.ts
src/api/article/types.ts
+1
-0
index.vue
src/components/common/Comment/index.vue
+6
-0
index.vue
src/views/questionDetail/index.vue
+15
-2
No files found.
src/api/article/index.ts
View file @
afc48ef5
...
...
@@ -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
,
})
}
src/api/article/types.ts
View file @
afc48ef5
...
...
@@ -368,6 +368,7 @@ export interface CommentItemDto {
isExpand
:
boolean
childNum
:
number
imgUrl
:
string
floorNumber
:
number
}
/**
...
...
src/components/common/Comment/index.vue
View file @
afc48ef5
...
...
@@ -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
...
...
src/views/questionDetail/index.vue
View file @
afc48ef5
...
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment