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
a8c4fa08
Commit
a8c4fa08
authored
Apr 21, 2022
by
崔佳豪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: loginMode 存入cookie失败
parent
324999fb
Pipeline
#48410
passed with stages
in 2 minutes 19 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
index.js
src/pages/user/login/template/cloud/index.js
+5
-5
No files found.
src/pages/user/login/template/cloud/index.js
View file @
a8c4fa08
...
...
@@ -6,8 +6,9 @@ import { Helmet, HelmetProvider } from 'react-helmet-async';
import
classNames
from
'classnames'
;
import
{
dom
}
from
'@wisdom-utils/utils/lib/helpers'
;
import
{
useHistory
,
withRouter
}
from
'@wisdom-utils/runtime'
;
import
Cookies
from
'js-cookie'
;
import
{
actionCreators
}
from
'@/containers/App/store'
;
import
{
LOGIN_WAY
}
from
'@/constants'
;
import
{
LOGIN_WAY
,
LOGIN_DISPLAY
}
from
'@/constants'
;
import
defaultSetting
from
'../../../../../../config/defaultSetting'
;
import
LoginAction
from
'../../login'
;
import
styles
from
'./index.less'
;
...
...
@@ -17,7 +18,6 @@ import IotComponent from '../../js/useIOTComponent';
import
CloudForm
from
'./cloudForm'
;
import
{
initMicroApps
}
from
'../../../../../micro'
;
import
useTime
from
'../../js/useTime'
;
import
{
LOGIN_DISPLAY
}
from
'../../../../../constants'
;
const
isRQcodeFunc
=
loginFunc
=>
{
const
rqcodeFuncs
=
[
LOGIN_DISPLAY
.
WeChart
,
LOGIN_DISPLAY
.
WeCom
];
...
...
@@ -25,9 +25,9 @@ const isRQcodeFunc = loginFunc => {
};
const
loginFuncImg
=
loginFunc
=>
{
if
(
isRQcodeFunc
(
loginFunc
))
{
return
require
(
'@/assets/images/login/cloud/func_
rqcode
.png'
);
return
require
(
'@/assets/images/login/cloud/func_
pwd
.png'
);
}
return
require
(
'@/assets/images/login/cloud/func_
pwd
.png'
);
return
require
(
'@/assets/images/login/cloud/func_
rqcode
.png'
);
};
const
Login
=
forwardRef
((
props
,
_ref
)
=>
{
...
...
@@ -150,7 +150,7 @@ const Login = forwardRef((props, _ref) => {
const
toggleLoginFunc
=
e
=>
{
e
&&
e
.
stopPropagation
&&
e
.
stopPropagation
();
setType
(
isRQcodeFunc
(
type
)
?
LOGIN_DISPLAY
.
Account
:
LOGIN_DISPLAY
.
WeCom
);
props
.
updateLoginMode
(
isRQcodeFunc
(
type
)
?
LOGIN_WAY
[
LOGIN_DISPLAY
.
Account
]
:
LOGIN_WAY
[
LOGIN_DISPLAY
.
WeCom
])
props
.
updateLoginMode
(
isRQcodeFunc
(
type
)
?
LOGIN_WAY
[
LOGIN_DISPLAY
.
Account
]
:
LOGIN_WAY
[
LOGIN_DISPLAY
.
WeCom
])
;
Cookies
.
set
(
'loginMode'
,
isRQcodeFunc
(
type
)
?
LOGIN_WAY
[
LOGIN_DISPLAY
.
Account
]
:
LOGIN_WAY
[
LOGIN_DISPLAY
.
WeCom
],
{
expires
:
5
*
60
*
1000
,
path
:
'/'
,
...
...
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