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
32c9b4ed
Commit
32c9b4ed
authored
Jun 15, 2024
by
周宏民
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改 登录
parent
a531419c
Pipeline
#89851
passed with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
login.js
src/pages/user/login/login.js
+1
-1
index.js
src/pages/user/login/template/cloudNew/index.js
+5
-7
No files found.
src/pages/user/login/login.js
View file @
32c9b4ed
...
...
@@ -924,7 +924,7 @@ class Login {
if
(
response
&&
response
.
getMe
&&
response
.
getMe
.
length
)
{
const
tk
=
response
.
getMe
[
0
].
Token
;
self
.
globalConfig
.
token
=
tk
;
//
Cookies.set('token', tk);
Cookies
.
set
(
'token'
,
tk
);
let
url
=
window
.
location
.
href
;
// 获取当前页面的url
if
(
url
.
indexOf
(
'&code'
)
!==
-
1
)
{
// 判断是否存在参数
...
...
src/pages/user/login/template/cloudNew/index.js
View file @
32c9b4ed
...
...
@@ -41,14 +41,15 @@ const Login = forwardRef((props, _ref) => {
const
history
=
useHistory
();
const
[
action
,
setAction
]
=
useState
(()
=>
new
LoginAction
(
Object
.
assign
({},
props
,
{
history
}),
setVisible
,
true
));
let
{
ddCode
}
=
props
.
global
;
const
loginMode
=
Cookies
.
get
(
'loginMode'
)
||
null
;
if
(
loginMode
&&
loginMode
===
'iotWechat'
)
ddCode
=
null
;
if
(
type
===
LOGIN_DISPLAY
.
WeCom
)
{
Cookies
.
set
(
'loginMode'
,
isRQcodeFunc
(
type
)
?
LOGIN_WAY
[
LOGIN_DISPLAY
.
Account
]
:
LOGIN_WAY
[
LOGIN_DISPLAY
.
WeCom
],
{
if
(
originType
)
{
Cookies
.
set
(
'loginMode'
,
LOGIN_WAY
[
LOGIN_DISPLAY
.
WeCom
],
{
expires
:
5
*
60
*
1000
,
path
:
'/'
,
});
}
const
loginMode
=
Cookies
.
get
(
'loginMode'
)
||
null
;
if
(
loginMode
&&
loginMode
===
'iotWechat'
)
ddCode
=
null
;
const
handleSubmit
=
values
=>
{
/* eslint-disable */
action
&&
...
...
@@ -97,8 +98,6 @@ const Login = forwardRef((props, _ref) => {
},
[
props
.
loginMode
]);
useEffect
(()
=>
{
if
(
ddCode
&&
loginMode
===
'qywx'
)
{
}
else
{
dom
.
removeClass
(
timeRef
.
current
,
styles
.
caseHide
);
dom
.
addClass
(
timeRef
.
current
,
'animate__fadeIn'
);
...
...
@@ -109,7 +108,6 @@ const Login = forwardRef((props, _ref) => {
dom
.
addClass
(
footerRef
.
current
,
'animate__slideInUp'
);
dom
.
removeClass
(
titleRef
.
current
,
styles
.
caseHide
);
dom
.
addClass
(
titleRef
.
current
,
'animte__fadeInUp'
);
}
return
()
=>
{};
},
[]);
useEffect
(()
=>
{
...
...
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