Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
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
shenshaokai
jinfa-platform
Commits
8fe13843
Commit
8fe13843
authored
Apr 06, 2022
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改首页会员无等级时显示错误,以及用户名显示错误
parent
bd36983c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
12 deletions
+25
-12
AvatarDropdown.tsx
src/layouts/components/AvatarDropdown.tsx
+2
-1
index.less
src/pages/home/components/UserCenter/index.less
+2
-1
index.tsx
src/pages/home/components/UserCenter/index.tsx
+21
-10
No files found.
src/layouts/components/AvatarDropdown.tsx
View file @
8fe13843
...
...
@@ -12,6 +12,7 @@ import { ReactComponent as DefaultAvatar } from '@/assets/imgs/default_avatar.sv
const
AvatarDropdown
=
(
props
)
=>
{
const
intl
=
useIntl
();
const
userAuth
=
getAuth
();
const
logout
=
()
=>
{
removeAuth
()
removeRouters
()
...
...
@@ -19,7 +20,7 @@ const AvatarDropdown = (props) => {
}
const
currentUser
=
{
name
:
getAuth
()
?.
company
||
intl
.
formatMessage
({
id
:
'common.weizhiyonghu'
}),
name
:
userAuth
.
name
||
userAuth
?.
company
||
intl
.
formatMessage
({
id
:
'common.weizhiyonghu'
}),
avatar
:
props
.
UserStore
.
avatar
||
''
,
}
...
...
src/pages/home/components/UserCenter/index.less
View file @
8fe13843
...
...
@@ -159,13 +159,14 @@
justify-content: center;
width: 140px;
margin-right: auto;
margin-right: 16px;
.levelImg {
height: 16px;
}
}
.score {
width: 140px;
//
width: 140px;
text-align: center;
margin-right: auto;
}
...
...
src/pages/home/components/UserCenter/index.tsx
View file @
8fe13843
...
...
@@ -68,6 +68,26 @@ const UserCenter: React.FC<Iprops> = (props) => {
const
isVerifyFail
=
useMemo
(()
=>
[
2
,
4
].
includes
(
userAuth
.
validateStatus
),
[
userAuth
]);
const
renderUserLevelAndScore
=
()
=>
{
if
(
enableMultiTenancy
)
{
return
null
;
}
return
(
<>
{
userAuth
.
levelTag
&&
(
<
div
className=
{
styles
.
level
}
>
{
intl
.
formatMessage
({
id
:
'home.userCenter.level'
})
}
:
<
StatusTag
type=
{
'primary'
}
title=
{
userAuth
.
levelTag
}
/>
</
div
>
)
||
null
}
<
div
className=
{
styles
.
score
}
>
{
intl
.
formatMessage
({
id
:
'home.userCenter.score'
})
}
:
<
strong
>
{
userAuth
.
score
}
</
strong
>
</
div
>
</>
)
}
return
(
<
div
className=
{
styles
.
container
}
>
<
div
className=
{
styles
.
header
}
>
...
...
@@ -140,16 +160,7 @@ const UserCenter: React.FC<Iprops> = (props) => {
</
div
>
<
div
className=
{
styles
.
otherValues
}
>
<
div
className=
{
styles
.
divider
}
>
{
!
enableMultiTenancy
&&
(
<>
<
div
className=
{
styles
.
level
}
>
{
intl
.
formatMessage
({
id
:
'home.userCenter.level'
})
}
:
<
StatusTag
type=
{
'primary'
}
title=
{
userAuth
.
levelTag
}
/>
</
div
>
<
div
className=
{
styles
.
score
}
>
{
intl
.
formatMessage
({
id
:
'home.userCenter.score'
})
}
:
<
strong
>
{
userAuth
.
score
}
</
strong
>
</
div
>
</>
)
}
{
renderUserLevelAndScore
()
}
{
userAuth
.
urls
.
includes
(
USER_CENTER_URL
)
&&
(
<
Link
to=
{
USER_CENTER_URL
}
className=
{
styles
.
link
}
>
{
intl
.
formatMessage
({
id
:
'home.userCenter.userAuth.link'
})
}
</
Link
>
...
...
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