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
dff43d7d
Commit
dff43d7d
authored
Dec 09, 2025
by
lijiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【需求 17679】 feat: 继续完善页面
parent
cefaabc9
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
91 additions
and
58 deletions
+91
-58
index.ts
src/api/index.ts
+2
-0
index.ts
src/api/otherUserPage/index.ts
+2
-3
index.vue
src/components/common/Comment/index.vue
+7
-2
route.ts
src/router/route.ts
+1
-1
index.vue
src/views/articleDetail/index.vue
+13
-1
index.vue
src/views/columnSearchList/index.vue
+3
-5
index.vue
src/views/homePage/askTab/index.vue
+1
-0
index.vue
src/views/homePage/index.vue
+1
-1
index.vue
src/views/otherUserPage/index.vue
+54
-34
index.vue
src/views/searchPage/index.vue
+3
-5
index.vue
src/views/videoDetail/index.vue
+1
-1
index.vue
src/views/videoSearchList/index.vue
+3
-5
No files found.
src/api/index.ts
View file @
dff43d7d
...
...
@@ -15,6 +15,7 @@ export * from './common'
export
*
from
'./login'
export
*
from
'./article'
export
*
from
'./online'
export
*
from
'./otherUserPage'
// 导出类型
export
*
from
'./task/types'
export
*
from
'./shop/types'
...
...
@@ -31,3 +32,4 @@ export * from './common/types'
export
*
from
'./login/types'
export
*
from
'./article/types'
export
*
from
'./online/types'
export
*
from
'./otherUserPage/types'
src/api/otherUserPage/index.ts
View file @
dff43d7d
import
service
from
'@/utils/request/index'
import
type
{
AddOrUpdateCaseDto
}
from
'./types'
import
type
{
BooleanFlag
}
from
'@/constants'
// 其他用户页面数据
...
...
@@ -19,13 +18,13 @@ export const getOtherUserData = (data: { userId: string; isReal: BooleanFlag })
* 显示其他用户的发帖数据
*/
export
const
getOtherUserPostData
=
(
data
:
{
u
serId
:
string
createU
serId
:
string
isReal
:
BooleanFlag
current
:
number
size
:
number
})
=>
{
return
service
.
request
({
url
:
'/api/personalCenter/
user
Data'
,
url
:
'/api/personalCenter/
getUserArticle
Data'
,
method
:
'POST'
,
data
,
})
...
...
src/components/common/Comment/index.vue
View file @
dff43d7d
...
...
@@ -294,9 +294,14 @@ import dayjs from 'dayjs'
import
{
useUserStore
}
from
'@/stores'
import
{
storeToRefs
}
from
'pinia'
const
{
id
,
defaultSize
=
10
}
=
defineProps
<
{
const
{
id
,
defaultSize
=
10
,
isReal
,
}
=
defineProps
<
{
id
:
number
|
string
defaultSize
?:
number
isReal
:
BooleanFlag
}
>
()
const
emit
=
defineEmits
<
{
...
...
@@ -476,7 +481,7 @@ const getCurrentChildrenList = (item: CommentItemDto) => {
const
handleUserInfo
=
(
item
:
CommentItemDto
)
=>
{
console
.
log
(
item
)
router
.
push
(
`/otherUserPage/
${
item
.
articleId
}
/1
`
)
router
.
push
(
`/otherUserPage/
${
item
.
userId
}
/
${
isReal
}
`
)
}
defineExpose
({
...
...
src/router/route.ts
View file @
dff43d7d
...
...
@@ -104,7 +104,7 @@ export const constantsRoute = [
},
// 点进去其他用户的个人中心
{
path
:
'otherUserPage/:
id/:isShiming
'
,
path
:
'otherUserPage/:
userId/:isReal
'
,
name
:
'CultureOtherUserPage'
,
component
:
()
=>
import
(
'@/views/otherUserPage/index.vue'
),
},
...
...
src/views/articleDetail/index.vue
View file @
dff43d7d
...
...
@@ -10,7 +10,12 @@
<ArticleContent
:articleDetail=
"articleDetail"
/>
<!-- 评论区 -->
<Comment
ref=
"commentRef"
:id=
"id"
v-model:total=
"articleDetail.replyCount"
/>
<Comment
ref=
"commentRef"
:id=
"id"
v-model:total=
"articleDetail.replyCount"
:isReal=
"isReal"
/>
</div>
</div>
</
template
>
...
...
@@ -20,11 +25,18 @@ import { getArticleDetail, type ArticleItemDto } from '@/api'
import
ActionButtons
from
'./components/actionButtons.vue'
import
Comment
from
'@/components/common/Comment/index.vue'
import
ArticleContent
from
'@/components/common/ArticleContent/index.vue'
import
{
ArticleTypeEnum
}
from
'@/constants'
const
commentRef
=
useTemplateRef
<
typeof
Comment
|
null
>
(
'commentRef'
)
const
route
=
useRoute
()
const
id
=
route
.
params
.
id
as
string
const
isReal
=
computed
(()
=>
{
return
+
(
articleDetail
.
value
.
type
===
ArticleTypeEnum
.
PRACTICE
||
articleDetail
.
value
.
type
===
ArticleTypeEnum
.
INTERVIEW
)
})
const
articleDetail
=
ref
({}
as
ArticleItemDto
)
const
initPage
=
()
=>
{
...
...
src/views/columnSearchList/index.vue
View file @
dff43d7d
...
...
@@ -137,15 +137,13 @@
<div
class=
"max-w-7xl mx-auto py-6"
>
<div
class=
"flex items-center justify-end gap-4"
>
<!-- 左侧:回到顶部按钮 -->
<div
class=
"left"
>
<
!-- <
div class="left">
<ScrollTopComp />
</div>
</div>
-->
<!-- 右侧:分页器 -->
<div
class=
"right"
>
<div
class=
"pagination-wrapper bg-white rounded-lg shadow-sm border border-gray-100 p-3"
>
<div
class=
"pr-4"
>
<el-pagination
v-model:current-page=
"searchParams.current"
v-model:page-size=
"searchParams.size"
...
...
src/views/homePage/askTab/index.vue
View file @
dff43d7d
...
...
@@ -152,6 +152,7 @@
:id=
"item.id"
:total=
"item.replyCount"
:defaultSize=
"5"
:isReal=
"0"
@
commentSuccess=
"() => handleCommentSuccess(item)"
/>
</Transition>
...
...
src/views/homePage/index.vue
View file @
dff43d7d
...
...
@@ -197,7 +197,7 @@
>
{{
item
.
label
}}
</span>
</div>
<span
class=
"text-#999 cursor-pointer"
@
click=
"router.push(`/userPage
?key=t
ask`)"
>
<span
class=
"text-#999 cursor-pointer"
@
click=
"router.push(`/userPage
/selfT
ask`)"
>
查看更多
</span>
</h2>
...
...
src/views/otherUserPage/index.vue
View file @
dff43d7d
<
template
>
<div
class=
"min-h-screen bg-gray-50 rounded-lg"
>
<!-- 顶部背景区域 -->
<div
class=
"box relative h-200px bg-gradient-to-r from-purple-400 via-pink-300 to-blue-300"
>
<!-- 顶部操作按钮 -->
<div
class=
"absolute top-4 right-4 flex gap-2"
>
<el-button
v-if=
"!userInfo.isOfficialAccount"
type=
"info"
plain
size=
"small"
@
click=
"handleClearCache"
>
清除缓存
</el-button>
<el-button
v-if=
"officialAccountList.length"
type=
"info"
plain
size=
"small"
@
click=
"handleSwitchAccount"
>
切换账号
</el-button>
<el-button
v-if=
"userInfo.isOfficialAccount"
type=
"info"
plain
size=
"small"
@
click=
"handleBackUser"
>
返回个人账号
</el-button>
<!-- v-if="userInfo.isAdmin" 暂时不加权限 -->
<el-button
type=
"primary"
plain
size=
"small"
@
click=
"handleAdmin"
>
后台管理
</el-button>
</div>
</div>
<div
class=
"box relative h-150px bg-gradient-to-r from-purple-400 via-pink-300 to-blue-300"
></div>
<!-- 主要内容区域 -->
<div
class=
"relative -mt-20 p-6"
>
...
...
@@ -23,16 +13,20 @@
<!-- 个人信息卡片 -->
<div
class=
"bg-white rounded-lg shadow-sm p-6 mb-4"
>
<div
class=
"flex items-start gap-4"
>
<el-avatar
:size=
"80"
:src=
"userInfo?.avatar"
class=
"border-4 border-white shadow-lg"
/>
<el-avatar
:size=
"80"
:src=
"userInfo?.avatar"
class=
"border-4 border-white shadow-lg"
/>
<div
class=
"flex-1"
>
<h2
class=
"text-xl font-semibold text-gray-800 mb-1"
>
{{
userInfo
?.
name
}}
</h2>
<p
class=
"text-gray-500 text-sm mb-2"
>
{{
userInfo
?.
signature
}}
</p>
<el-button
type=
"warning"
size=
"small"
plain
@
click=
"handleEdit"
>
<
!--
<
el-button
type=
"warning"
size=
"small"
plain
@
click=
"handleEdit"
>
<el-icon>
<Edit
/>
</el-icon>
修改资料
</el-button>
</el-button>
-->
</div>
</div>
</div>
...
...
@@ -49,10 +43,16 @@
</div>
<div
v-else
class=
"space-y-4"
>
<div
v-for=
"item in list"
:key=
"item.id"
class=
"flex items-center p-2 rounded-lg hover:bg-gray-100 transition-colors cursor-pointer px-6"
>
<div
@
click=
"handleOpenArticle(item)"
v-for=
"item in list"
:key=
"item.id"
class=
"flex items-center p-2 rounded-lg hover:bg-gray-100 transition-colors cursor-pointer px-6"
>
<div
class=
"flex-1 min-w-0"
>
<div
class=
"text-gray-900 font-medium truncate"
>
{{
item
.
title
||
'测试标题'
}}
</div>
<div
class=
"text-gray-900 font-medium truncate"
>
{{
item
.
title
||
'测试标题'
}}
</div>
<div
class=
"text-gray-500 text-sm mt-1 truncate"
>
<span
class=
"mr-2"
>
{{
dayjs
(
item
.
createTime
*
1000
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}}
...
...
@@ -64,12 +64,22 @@
</div>
<div
class=
"flex items-center text-gray-400 text-sm ml-4"
>
<el-
button
type=
"primary"
link
@
click=
"openArticleDetail(item.id)"
>
去回复
</el-
button
>
<el-
link
type=
"primary"
link
>
{{
articleTypeListOptions
.
find
((
i
)
=>
i
.
value
===
item
.
type
)?.
label
||
'--'
}}
</el-
link
>
</div>
<!--
<el-divider
/>
-->
</div>
<!-- 分页 -->
<div
class=
"flex justify-end p-6"
>
<el-pagination
v-model:current-page=
"searchParams.current"
v-model:page-size=
"searchParams.size"
:total=
"total"
@
size-change=
"changePageSize"
@
current-change=
"goToPage"
/>
</div>
</div>
</div>
</div>
...
...
@@ -87,14 +97,21 @@ import { generateLoginKey, hasOfficialAccount, getOtherUserData, getOtherUserPos
import
type
{
OfficialAccountItemDto
}
from
'@/api/user/types'
import
{
wxLogin
}
from
'@/utils/wxUtil'
import
dayjs
from
'dayjs'
import
{
usePageSearch
}
from
'@/hooks'
import
{
ArticleTypeEnum
,
articleTypeListOptions
}
from
'@/constants'
const
route
=
useRoute
()
const
list
=
[{},
{}]
const
userStore
=
useUserStore
()
const
{
userInfo
}
=
storeToRefs
(
userStore
)
const
{
list
,
total
,
loading
,
searchParams
,
search
,
reset
,
goToPage
,
changePageSize
,
refresh
}
=
usePageSearch
(
getOtherUserPostData
,
{
defaultParams
:
{
createUserId
:
route
.
params
.
userId
as
string
,
isReal
:
+
(
route
.
params
.
isReal
as
string
),
},
})
const
officialAccountList
=
ref
<
OfficialAccountItemDto
[]
>
([])
const
getIsOfficial
=
async
()
=>
{
...
...
@@ -103,17 +120,12 @@ const getIsOfficial = async () => {
officialAccountList
.
value
=
data
}
onMounted
(()
=>
{
// getOtherUserData({
// userId: route.params.userId as string,
// isReal: 1,
// })
// getOtherUserPostData({
// userId: route.params.userId as string,
// isReal: 1,
// current: 1,
// size: 10,
// })
getOtherUserData
({
userId
:
route
.
params
.
userId
as
string
,
isReal
:
+
(
route
.
params
.
isReal
as
string
),
})
})
const
handleSwitchAccount
=
async
()
=>
{
const
selectedEmail
=
ref
(
''
)
ElMessageBox
({
...
...
@@ -221,6 +233,14 @@ const handleClearCache = async () => {
window
.
location
.
reload
()
}
const
handleOpenArticle
=
(
item
:
any
)
=>
{
if
(
item
.
type
===
ArticleTypeEnum
.
VIDEO
)
{
window
.
open
(
`/videoDetail/
${
item
.
id
}
`
)
}
else
{
window
.
open
(
`/articleDetail/
${
item
.
id
}
`
)
}
}
onMounted
(()
=>
{
getIsOfficial
()
})
...
...
src/views/searchPage/index.vue
View file @
dff43d7d
...
...
@@ -157,15 +157,13 @@
<div
class=
"max-w-7xl mx-auto py-6"
>
<div
class=
"flex items-center justify-end gap-4"
>
<!-- 左侧:回到顶部按钮 -->
<div
class=
"left"
>
<
!--
<
div
class=
"left"
>
<ScrollTopComp
/>
</div>
</div>
-->
<!-- 右侧:分页器 -->
<div
class=
"right"
>
<div
class=
"pagination-wrapper bg-white rounded-lg shadow-sm border border-gray-100 p-3"
>
<div
class=
"pr-4"
>
<el-pagination
v-model:current-page=
"searchParams.current"
v-model:page-size=
"searchParams.size"
...
...
src/views/videoDetail/index.vue
View file @
dff43d7d
...
...
@@ -223,7 +223,7 @@
</div>
</div>
<Comment
ref=
"commentRef"
:id=
"videoId"
v-model:total=
"videoDetail.replyCount"
/>
<Comment
ref=
"commentRef"
:id=
"videoId"
v-model:total=
"videoDetail.replyCount"
:isReal=
"0"
/>
<RewardDialog
ref=
"rewardDialogRef"
v-model:rewardNum=
"videoDetail.rewardNum"
/>
</div>
</
template
>
...
...
src/views/videoSearchList/index.vue
View file @
dff43d7d
...
...
@@ -138,15 +138,13 @@
<div
class=
"max-w-7xl mx-auto py-6"
>
<div
class=
"flex items-center justify-end gap-4"
>
<!-- 左侧:回到顶部按钮 -->
<div
class=
"left"
>
<
!-- <
div class="left">
<ScrollTopComp />
</div>
</div>
-->
<!-- 右侧:分页器 -->
<div
class=
"right"
>
<div
class=
"pagination-wrapper bg-white rounded-lg shadow-sm border border-gray-100 p-3"
>
<div
class=
"pr-4"
>
<el-pagination
v-model:current-page=
"searchParams.current"
v-model:page-size=
"searchParams.size"
...
...
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