Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
corporateCulture-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
王立鹏
corporateCulture-qd
Commits
86e61957
Commit
86e61957
authored
Dec 22, 2025
by
lijiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【需求 17679】 feat: 问吧展示发帖人信息、以及问吧首页列表tab调整等
parent
4921139c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
5 deletions
+42
-5
types.ts
src/api/article/types.ts
+1
-0
index.vue
src/components/common/Comment/index.vue
+1
-1
index.vue
src/views/homePage/askTab/index.vue
+13
-1
index.vue
src/views/questionDetail/index.vue
+27
-3
No files found.
src/api/article/types.ts
View file @
86e61957
...
...
@@ -8,6 +8,7 @@ export interface ArticleSearchParams extends PageSearchParams {
type
?:
ArticleTypeEnum
sortLogic
?:
number
title
?:
string
questionFocus
?:
number
}
/**
...
...
src/components/common/Comment/index.vue
View file @
86e61957
<
template
>
<div
ref=
"commentRef"
class=
"
mt-6
bg-white backdrop-blur-sm rounded-lg shadow-sm border border-white/50 overflow-hidden"
class=
"bg-white backdrop-blur-sm rounded-lg shadow-sm border border-white/50 overflow-hidden"
>
<!-- 评论筛选 -->
<div
class=
"p-4 border-b border-gray-100"
>
...
...
src/views/homePage/askTab/index.vue
View file @
86e61957
...
...
@@ -264,6 +264,7 @@ const { list, total, searchParams, loading, refresh, goToPage, changePageSize, s
immediate
:
false
,
defaultParams
:
{
type
:
ArticleTypeEnum
.
QUESTION
,
sortLogic
:
1
,
},
formatList
:
(
list
)
=>
list
.
map
((
item
)
=>
({
...
...
@@ -282,6 +283,7 @@ const handleCollect = async (item: ArticleItemDto) => {
item
.
hasCollect
=
!
item
.
hasCollect
item
.
collectionCount
=
item
.
hasCollect
?
item
.
collectionCount
+
1
:
item
.
collectionCount
-
1
ElMessage
.
success
(
item
.
hasCollect
?
'收藏成功'
:
'取消收藏'
)
refresh
()
}
// 一个是直接写这个问题的首评论 一个是直接给最热评论写评论
...
...
@@ -320,7 +322,17 @@ const handleRefresh = () => {
refresh
()
}
const
handleTabChange
=
()
=>
{
const
handleTabChange
=
(
val
:
string
)
=>
{
if
(
val
===
'热问'
)
{
searchParams
.
value
.
sortLogic
=
0
searchParams
.
value
.
questionFocus
=
undefined
}
else
if
(
val
===
'关注'
)
{
searchParams
.
value
.
sortLogic
=
undefined
searchParams
.
value
.
questionFocus
=
1
}
else
if
(
val
===
'最新'
)
{
searchParams
.
value
.
questionFocus
=
undefined
searchParams
.
value
.
sortLogic
=
1
}
handleRefresh
()
}
...
...
src/views/questionDetail/index.vue
View file @
86e61957
...
...
@@ -30,7 +30,25 @@
编辑
</el-link>
</div>
<!-- 👇 新增:发布人信息 -->
<div
class=
"flex items-center gap-3 pb-3 border-b border-slate-100"
>
<el-avatar
:src=
"questionDetail.createUserAvatar"
:size=
"40"
class=
"flex-shrink-0 cursor-pointer"
@
click=
"jumpToUserHomePage(
{ userId: questionDetail.createUserId, isReal: 0 })"
>
{{
questionDetail
.
createUserName
}}
</el-avatar>
<div
class=
"flex flex-col"
>
<span
class=
"text-sm font-medium text-slate-900"
>
{{
questionDetail
.
createUserName
}}
</span>
<span
class=
"text-xs text-slate-500"
>
发布于
{{
dayjs
(
questionDetail
.
createTime
*
1000
).
format
(
'YYYY-MM-DD HH:mm'
)
}}
</span>
</div>
</div>
<!-- 标题:主要信息,黑重粗 -->
<h1
class=
"text-2xl font-bold text-slate-900 mb-3 leading-snug tracking-tight"
>
{{
questionDetail
.
title
}}
...
...
@@ -153,9 +171,14 @@
>
<!-- 用户头 -->
<div
class=
"flex items-center gap-3 mb-3"
>
<img
:src=
"answer.avatar"
class=
"w-9 h-9 rounded bg-slate-100 object-cover"
/>
<el-avatar
:src=
"answer.avatar"
:size=
"36"
class=
"flex-shrink-0 cursor-pointer"
@
click=
"jumpToUserHomePage(
{ userId: answer.userId, isReal: 0 })"
/>
<div>
<div
class=
"
font-bold
text-slate-900 text-sm flex items-center gap-2"
>
<div
class=
"text-slate-900 text-sm flex items-center gap-2"
>
{{
answer
.
hiddenName
}}
<!-- 徽章示例 -->
<!--
<span
...
...
@@ -270,6 +293,7 @@ import CommentDialog from '@/components/common/CommentDialog/index.vue'
import
dayjs
from
'dayjs'
import
{
useUserStore
}
from
'@/stores/user'
import
{
storeToRefs
}
from
'pinia'
import
{
jumpToUserHomePage
}
from
'@/utils'
const
userStore
=
useUserStore
()
const
{
userInfo
}
=
storeToRefs
(
userStore
)
...
...
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