Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
lls_program
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-09-25 22:27:37 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6067e8fdc3f425ffc0278f1da73b977152495597
6067e8fd
1 parent
5719880d
fix(authRedirect): 修复检查用户是否有家庭时的数据判断逻辑
修复当data对象存在但families字段不存在时的判断错误,使用可选链操作符确保安全访问
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
src/utils/authRedirect.js
src/utils/authRedirect.js
View file @
6067e8f
/*
* @Date: 2025-01-25 10:00:00
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-09-
13 09:07:59
* @LastEditTime: 2025-09-
23 14:33:30
* @FilePath: /lls_program/src/utils/authRedirect.js
* @Description: 授权重定向处理工具函数
*/
...
...
@@ -69,7 +69,7 @@ export const navigateToAuth = (returnPath) => {
export
const
checkUserHasFamily
=
async
()
=>
{
try
{
const
{
code
,
data
}
=
await
getMyFamiliesAPI
()
if
(
code
&&
data
&&
data
.
length
>
0
)
{
if
(
code
&&
data
&&
data
?.
families
?
.
length
>
0
)
{
return
true
}
return
false
...
...
Please
register
or
login
to post a comment