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
54b7e494
Commit
54b7e494
authored
Dec 11, 2025
by
lijiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【需求 17679】 perf: 优化进入其他用户页面的数据展示
parent
ffac116b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
7 deletions
+28
-7
index.ts
src/api/otherUserPage/index.ts
+2
-1
types.ts
src/api/otherUserPage/types.ts
+14
-0
index.vue
src/views/otherUserPage/index.vue
+12
-6
No files found.
src/api/otherUserPage/index.ts
View file @
54b7e494
import
service
from
'@/utils/request/index'
import
service
from
'@/utils/request/index'
import
type
{
BooleanFlag
}
from
'@/constants'
import
type
{
BooleanFlag
}
from
'@/constants'
import
type
{
OtherUserInfoDto
}
from
'@/types'
// 其他用户页面数据
// 其他用户页面数据
...
@@ -7,7 +8,7 @@ import type { BooleanFlag } from '@/constants'
...
@@ -7,7 +8,7 @@ import type { BooleanFlag } from '@/constants'
* 获取其他用户的用户信息
* 获取其他用户的用户信息
*/
*/
export
const
getOtherUserData
=
(
data
:
{
userId
:
string
;
isReal
:
BooleanFlag
})
=>
{
export
const
getOtherUserData
=
(
data
:
{
userId
:
string
;
isReal
:
BooleanFlag
})
=>
{
return
service
.
request
<
string
>
({
return
service
.
request
<
OtherUserInfoDto
>
({
url
:
'/api/personalCenter/userData'
,
url
:
'/api/personalCenter/userData'
,
method
:
'POST'
,
method
:
'POST'
,
data
,
data
,
...
...
src/api/otherUserPage/types.ts
View file @
54b7e494
...
@@ -17,3 +17,17 @@ export interface AddOrUpdateCaseDto {
...
@@ -17,3 +17,17 @@ export interface AddOrUpdateCaseDto {
isSync
:
BooleanFlag
isSync
:
BooleanFlag
releaseStatus
:
ReleaseStatusTypeEnum
releaseStatus
:
ReleaseStatusTypeEnum
}
}
export
interface
OtherUserInfoDto
{
ayabiAvailable
:
number
ayabiTotal
:
number
createTime
:
string
expTotal
:
number
id
:
number
isDelete
:
BooleanFlag
level
:
number
remark
:
string
showAvatar
:
string
showName
:
string
signature
:
string
updateTime
:
string
}
src/views/otherUserPage/index.vue
View file @
54b7e494
...
@@ -15,12 +15,16 @@
...
@@ -15,12 +15,16 @@
<div
class=
"flex items-start gap-4"
>
<div
class=
"flex items-start gap-4"
>
<el-avatar
<el-avatar
:size=
"80"
:size=
"80"
:src=
"userInfo?.
a
vatar"
:src=
"userInfo?.
showA
vatar"
class=
"border-4 border-white shadow-lg"
class=
"border-4 border-white shadow-lg"
/>
/>
<div
class=
"flex-1"
>
<div
class=
"flex-1"
>
<h2
class=
"text-xl font-semibold text-gray-800 mb-1 mt-4"
>
{{
userInfo
?.
name
}}
</h2>
<h2
class=
"text-xl font-semibold text-gray-800 mb-1 mt-4"
>
<p
class=
"text-gray-500 text-sm mb-2"
>
{{
userInfo
?.
signature
}}
</p>
{{
userInfo
?.
showName
}}
</h2>
<p
v-if=
"!+(route.params.isReal as string)"
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>
<el-icon>
<Edit
/>
<Edit
/>
...
@@ -99,11 +103,11 @@ import { wxLogin } from '@/utils/wxUtil'
...
@@ -99,11 +103,11 @@ import { wxLogin } from '@/utils/wxUtil'
import
dayjs
from
'dayjs'
import
dayjs
from
'dayjs'
import
{
usePageSearch
}
from
'@/hooks'
import
{
usePageSearch
}
from
'@/hooks'
import
{
ArticleTypeEnum
,
articleTypeListOptions
}
from
'@/constants'
import
{
ArticleTypeEnum
,
articleTypeListOptions
}
from
'@/constants'
import
type
{
OtherUserInfoDto
}
from
'@/api/otherUserPage/types'
const
route
=
useRoute
()
const
route
=
useRoute
()
const
userStore
=
useUserStore
()
const
userStore
=
useUserStore
()
const
{
userInfo
}
=
storeToRefs
(
userStore
)
const
{
list
,
total
,
loading
,
searchParams
,
search
,
reset
,
goToPage
,
changePageSize
,
refresh
}
=
const
{
list
,
total
,
loading
,
searchParams
,
search
,
reset
,
goToPage
,
changePageSize
,
refresh
}
=
usePageSearch
(
getOtherUserPostData
,
{
usePageSearch
(
getOtherUserPostData
,
{
...
@@ -119,11 +123,13 @@ const getIsOfficial = async () => {
...
@@ -119,11 +123,13 @@ const getIsOfficial = async () => {
console
.
log
(
data
)
console
.
log
(
data
)
officialAccountList
.
value
=
data
officialAccountList
.
value
=
data
}
}
onMounted
(()
=>
{
const
userInfo
=
ref
<
OtherUserInfoDto
>
({}
as
OtherUserInfoDto
)
getOtherUserData
({
onMounted
(
async
()
=>
{
const
{
data
}
=
await
getOtherUserData
({
userId
:
route
.
params
.
userId
as
string
,
userId
:
route
.
params
.
userId
as
string
,
isReal
:
+
(
route
.
params
.
isReal
as
string
),
isReal
:
+
(
route
.
params
.
isReal
as
string
),
})
})
userInfo
.
value
=
data
})
})
const
handleSwitchAccount
=
async
()
=>
{
const
handleSwitchAccount
=
async
()
=>
{
...
...
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