Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivWeb
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
ReactWeb5
CivWeb
Commits
dcaa05b6
Commit
dcaa05b6
authored
Jan 23, 2024
by
杨思琦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 认证修改
parent
bb9ceb66
Pipeline
#84605
passed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
24 deletions
+28
-24
BasicLayout.js
src/layouts/BasicLayout.js
+28
-24
No files found.
src/layouts/BasicLayout.js
View file @
dcaa05b6
...
...
@@ -316,32 +316,36 @@ const Layout = props => {
clear
();
props
.
logout
();
}
store
.
on
(
'event:unauthorized'
,
()
=>
{
if
(
props
.
global
.
security
===
"1"
)
{
store
.
off
(
'event:unauthorized'
);
const
key
=
`open
${
Date
.
now
()}
`
;
if
(
notify
)
return
false
;
notify
=
true
;
notification
.
open
({
description
:
'登录认证过期,即将跳转到登录页'
,
duration
:
null
,
btn
:
(
<
Button
className
=
{
classNames
(
`
${
prefixCls
}
-btn`
,
`
${
prefixCls
}
-btn-primary`
)}
type
=
"primary"
onClick
=
{()
=>
{
notification
.
close
(
key
);
setTimeout
(()
=>
{
notify
=
null
;
clear
();
props
.
logout
();
})
}}
>
确认
<
/Button
>
),
key
,
closeIcon
:
<><
/>
,
}
else
{
store
.
on
(
'event:unauthorized'
,
()
=>
{
store
.
off
(
'event:unauthorized'
);
const
key
=
`open
${
Date
.
now
()}
`
;
if
(
notify
)
return
false
;
notify
=
true
;
notification
.
open
({
description
:
'登录认证过期,即将跳转到登录页'
,
duration
:
null
,
btn
:
(
<
Button
className
=
{
classNames
(
`
${
prefixCls
}
-btn`
,
`
${
prefixCls
}
-btn-primary`
)}
type
=
"primary"
onClick
=
{()
=>
{
notification
.
close
(
key
);
setTimeout
(()
=>
{
notify
=
null
;
clear
();
props
.
logout
();
})
}}
>
确认
<
/Button
>
),
key
,
closeIcon
:
<><
/>
,
});
});
}
);
}
return
()
=>
{
store
.
off
(
'event:unauthorized'
);
};
...
...
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