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
a75e9efd
Commit
a75e9efd
authored
3 years ago
by
崔佳豪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 退出client参数为token问题
parent
86184b18
Pipeline
#48553
skipped with stages
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
reducer.js
src/containers/App/store/reducer.js
+1
-1
initConfig.js
src/initConfig.js
+3
-3
login.js
src/pages/user/login/login.js
+2
-2
No files found.
src/containers/App/store/reducer.js
View file @
a75e9efd
...
...
@@ -123,7 +123,7 @@ const appReducer = (state = initialState, action) => {
}
}
window
.
globalConfig
.
home
=
home
;
Cookies
.
set
(
'c
ity'
,
Cookies
.
get
(
'city
'
)
||
window
.
globalConfig
.
client
);
Cookies
.
set
(
'c
lient'
,
Cookies
.
get
(
'client
'
)
||
window
.
globalConfig
.
client
);
window
.
globalConfig
=
config
;
return
state
.
merge
({
globalConfig
:
config
,
...
...
This diff is collapsed.
Click to expand it.
src/initConfig.js
View file @
a75e9efd
...
...
@@ -47,7 +47,7 @@ export const initGlobalConfig = () => {
// // eslint-disable-next-line react-hooks/rules-of-hooks
// }
let
client
=
params
.
getParams
(
'client'
)
||
Cookies
.
get
(
'c
ity
'
);
let
client
=
params
.
getParams
(
'client'
)
||
Cookies
.
get
(
'c
lient
'
);
client
=
client
&&
client
!==
'undefined'
?
client
:
'city'
;
const
queryConfig
=
(
gateWayConfig
=
{})
=>
{
...
...
@@ -62,7 +62,7 @@ export const initGlobalConfig = () => {
if
(
!
data
.
client
)
{
data
.
client
=
client
;
}
// Cookies.set('c
ity
', data.client);
// Cookies.set('c
lient
', data.client);
store
.
dispatch
(
actionCreators
.
getConfig
(
Object
.
assign
(
...
...
@@ -78,7 +78,7 @@ export const initGlobalConfig = () => {
),
);
// Cookies.set('c
ity
', params.getParams('client'))
// Cookies.set('c
lient
', params.getParams('client'))
if
(
data
.
loginTemplate
===
'新春 - 智联.html'
)
{
updateTheme
(
'#ff9600'
);
...
...
This diff is collapsed.
Click to expand it.
src/pages/user/login/login.js
View file @
a75e9efd
...
...
@@ -920,13 +920,13 @@ class Login {
if
(
response
.
access_token
!==
""
)
{
self
.
globalConfig
.
access_token
=
response
.
access_token
;
localStorage
.
setItem
(
'access_token'
,
response
.
access_token
);
Cookies
.
set
(
'c
ity
'
,
self
.
globalConfig
.
client
,
{
Cookies
.
set
(
'c
lient
'
,
self
.
globalConfig
.
client
,
{
expires
:
exp
/
(
24
*
60
*
60
*
1000
),
path
:
'/'
,
})
}
if
(
isRememberPWD
)
{
Cookies
.
set
(
'c
ity
'
,
self
.
globalConfig
.
client
,
{
Cookies
.
set
(
'c
lient
'
,
self
.
globalConfig
.
client
,
{
expires
:
exp
/
(
24
*
60
*
60
*
1000
),
path
:
'/'
,
});
...
...
This diff is collapsed.
Click to expand it.
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