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
d1cb1de9
Commit
d1cb1de9
authored
Jun 06, 2023
by
杨思琦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 免登修改
parent
b9465cdf
Pipeline
#73670
passed with stages
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
18 deletions
+0
-18
noSecret.js
src/pages/user/login/noSecret.js
+0
-18
No files found.
src/pages/user/login/noSecret.js
View file @
d1cb1de9
...
@@ -23,12 +23,10 @@ const Login = forwardRef((props, _ref) => {
...
@@ -23,12 +23,10 @@ const Login = forwardRef((props, _ref) => {
const
param
=
params
.
getParams
(
'token'
)?.
replaceAll
(
';'
,
'&'
);
const
param
=
params
.
getParams
(
'token'
)?.
replaceAll
(
';'
,
'&'
);
return
param
?
decodeURIComponent
(
escape
(
param
))
:
null
;
return
param
?
decodeURIComponent
(
escape
(
param
))
:
null
;
});
});
const
[
authCode
]
=
useState
(()
=>
{
const
[
authCode
]
=
useState
(()
=>
{
const
param
=
params
.
getParams
(
'authCode'
)?.
replaceAll
(
';'
,
'&'
);
const
param
=
params
.
getParams
(
'authCode'
)?.
replaceAll
(
';'
,
'&'
);
return
param
?
decodeURIComponent
(
escape
(
param
))
:
null
;
return
param
?
decodeURIComponent
(
escape
(
param
))
:
null
;
});
});
// 需要在 GetGateWay 和 GetConfig 之后再执行登录。避免信息错落乱
// 需要在 GetGateWay 和 GetConfig 之后再执行登录。避免信息错落乱
const
hasLogin
=
useRef
();
const
hasLogin
=
useRef
();
useEffect
(()
=>
{
useEffect
(()
=>
{
...
@@ -40,13 +38,6 @@ const Login = forwardRef((props, _ref) => {
...
@@ -40,13 +38,6 @@ const Login = forwardRef((props, _ref) => {
hasLogin
.
current
!==
true
&&
hasLogin
.
current
!==
true
&&
window
.
hasLogin
!==
true
window
.
hasLogin
!==
true
)
{
)
{
appService
.
checkFreeLogin
({
token
,
authCode
,
})
.
then
(
response
=>
{
if
(
response
?.
data
)
{
hasLogin
.
current
=
true
;
hasLogin
.
current
=
true
;
window
.
hasLogin
=
true
;
window
.
hasLogin
=
true
;
if
(
window
.
globalConfig
&&
window
.
globalConfig
.
hasGateWay
)
{
if
(
window
.
globalConfig
&&
window
.
globalConfig
.
hasGateWay
)
{
...
@@ -81,15 +72,6 @@ const Login = forwardRef((props, _ref) => {
...
@@ -81,15 +72,6 @@ const Login = forwardRef((props, _ref) => {
}
else
{
}
else
{
action
.
init
();
action
.
init
();
}
}
return
response
?.
data
;
}
message
.
error
({
duration
:
3
,
content
:
`授权失败`
,
});
action
&&
action
.
events
.
emit
(
'loginError'
,
'授权失败'
);
return
Promise
.
reject
(
response
);
});
}
}
},
[
action
,
action
.
globalConfig
,
props
.
global
]);
},
[
action
,
action
.
globalConfig
,
props
.
global
]);
...
...
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