Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-csf-h5
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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jianan
yd-csf-h5
Commits
b0615cd0
Commit
b0615cd0
authored
Oct 27, 2026
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 手机号 claim 兼容 Casdoor 的 phone(原取标准 phone_number,Casdoor 下恒为空)
parent
7b68f4ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
+2
-1
src/stores/auth.ts
+2
-1
No files found.
src/stores/auth.ts
View file @
b0615cd0
...
...
@@ -17,7 +17,8 @@ function toAuthUser(u: User | null): AuthUser | null {
if
(
!
u
||
u
.
expired
)
return
null
const
p
=
u
.
profile
const
name
=
p
.
name
??
p
.
preferred_username
??
''
return
{
name
,
phone
:
p
.
phone_number
??
''
}
// Casdoor 的手机号 claim 是 `phone`(非标准 `phone_number`),两者兼容取
return
{
name
,
phone
:
(
p
.
phone
as
string
|
undefined
)
??
p
.
phone_number
??
''
}
}
export
const
useAuthStore
=
defineStore
(
'auth'
,
()
=>
{
...
...
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