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
63159031
Commit
63159031
authored
Dec 20, 2021
by
邓晓峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复登陆信息错乱
parent
dea88155
Pipeline
#40697
passed with stages
in 4 minutes 17 seconds
Changes
6
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
8 deletions
+16
-8
reducer.js
src/containers/App/store/reducer.js
+3
-1
initConfig.js
src/initConfig.js
+2
-1
BasicLayout1.js
src/layouts/BasicLayout1.js
+1
-1
micro.js
src/micro.js
+1
-2
login.js
src/pages/user/login/login.js
+3
-2
event.js
src/utils/event.js
+6
-1
No files found.
src/containers/App/store/reducer.js
View file @
63159031
...
@@ -2,7 +2,7 @@ import { fromJS } from 'immutable';
...
@@ -2,7 +2,7 @@ import { fromJS } from 'immutable';
import
Cookies
from
'js-cookie'
;
import
Cookies
from
'js-cookie'
;
import
AppConfig
from
'kit_global_config'
;
import
AppConfig
from
'kit_global_config'
;
import
{
Storeage
as
Store
}
from
'kit_utils'
;
import
{
Storeage
as
Store
}
from
'kit_utils'
;
import
{
store
}
from
'microser-data'
;
import
{
store
,
event
}
from
'microser-data'
;
import
{
Storage
}
from
'@wisdom-utils/utils'
;
import
{
Storage
}
from
'@wisdom-utils/utils'
;
import
pkg
from
'../../../../package.json'
;
import
pkg
from
'../../../../package.json'
;
import
defaultSetting
from
'../../../../config/defaultSetting'
;
import
defaultSetting
from
'../../../../config/defaultSetting'
;
...
@@ -139,6 +139,7 @@ const appReducer = (state = initialState, action) => {
...
@@ -139,6 +139,7 @@ const appReducer = (state = initialState, action) => {
Cookies
.
set
(
'city'
,
Cookies
.
get
(
'city'
)
||
window
.
globalConfig
.
client
);
Cookies
.
set
(
'city'
,
Cookies
.
get
(
'city'
)
||
window
.
globalConfig
.
client
);
window
.
globalConfig
=
config
;
return
state
.
merge
({
return
state
.
merge
({
globalConfig
:
config
,
globalConfig
:
config
,
menu
:
generMenu
||
[],
menu
:
generMenu
||
[],
...
@@ -229,6 +230,7 @@ const appReducer = (state = initialState, action) => {
...
@@ -229,6 +230,7 @@ const appReducer = (state = initialState, action) => {
microMounted
:
action
.
data
,
microMounted
:
action
.
data
,
});
});
case
LOGINOUT
:
case
LOGINOUT
:
event
.
emit
(
'event: application-logout'
,
action
.
data
);
return
state
.
merge
({
return
state
.
merge
({
complexConfig
:
action
.
data
.
complexConfig
,
complexConfig
:
action
.
data
.
complexConfig
,
currentMenuIndex
:
action
.
data
.
currentMenuIndex
,
currentMenuIndex
:
action
.
data
.
currentMenuIndex
,
...
...
src/initConfig.js
View file @
63159031
...
@@ -11,7 +11,7 @@ export const initGlobalConfig = (loader, store, render) => {
...
@@ -11,7 +11,7 @@ export const initGlobalConfig = (loader, store, render) => {
// eslint-disable-next-line no-debugger
// eslint-disable-next-line no-debugger
// eslint-disable-next-line no-undef
// eslint-disable-next-line no-undef
createStoreage
.
remove
(
`__PANDA_STORE__
${
location
.
hostname
}
`
);
createStoreage
.
remove
(
`__PANDA_STORE__
${
location
.
hostname
}
`
);
window
.
globalConfig
=
{};
let
config
=
createStoreage
.
get
(
'globalConfig'
)
||
{};
let
config
=
createStoreage
.
get
(
'globalConfig'
)
||
{};
store
.
dispatch
(
actionCreators
.
updateComplexConfig
({}));
store
.
dispatch
(
actionCreators
.
updateComplexConfig
({}));
if
(
!
getToken
()
||
config
.
token
==
null
)
{
if
(
!
getToken
()
||
config
.
token
==
null
)
{
...
@@ -74,6 +74,7 @@ export const initGlobalConfig = (loader, store, render) => {
...
@@ -74,6 +74,7 @@ export const initGlobalConfig = (loader, store, render) => {
Object
.
assign
({},
data
,
{
Object
.
assign
({},
data
,
{
token
:
''
,
token
:
''
,
access_token
:
''
,
access_token
:
''
,
userInfo
:
null
}),
}),
),
),
);
);
...
...
src/layouts/BasicLayout1.js
View file @
63159031
...
@@ -426,7 +426,7 @@ const BasicLayout = props => {
...
@@ -426,7 +426,7 @@ const BasicLayout = props => {
}
}
const
handleUpdateCurrentIndex
=
index
=>
{
const
handleUpdateCurrentIndex
=
index
=>
{
debugger
setSelectIndex
(
-
1
)
setSelectIndex
(
-
1
)
props
.
updateCurrentIndex
(
index
);
props
.
updateCurrentIndex
(
index
);
window
.
share
&&
window
.
share
.
event
.
emit
(
'trigger:updateMenuIndex'
,
index
);
window
.
share
&&
window
.
share
.
event
.
emit
(
'trigger:updateMenuIndex'
,
index
);
...
...
src/micro.js
View file @
63159031
...
@@ -34,7 +34,6 @@ const MICRO_STATUS = {
...
@@ -34,7 +34,6 @@ const MICRO_STATUS = {
export
const
initMicroApps
=
(
loader
,
store
)
=>
{
export
const
initMicroApps
=
(
loader
,
store
)
=>
{
/* eslint-disable */
/* eslint-disable */
const
config
=
createStoreage
.
get
(
'globalConfig'
);
const
config
=
createStoreage
.
get
(
'globalConfig'
);
const
application
=
config
&&
config
.
products
||
[];
const
application
=
config
&&
config
.
products
||
[];
let
products
=
[];
let
products
=
[];
...
@@ -54,7 +53,7 @@ export const initMicroApps = (loader, store) => {
...
@@ -54,7 +53,7 @@ export const initMicroApps = (loader, store) => {
process
.
env
.
NODE_ENV
!==
'production'
?
process
.
env
.
NODE_ENV
!==
'production'
?
micorConfig
.
dev
:
micorConfig
.
dev
:
products
;
products
;
console
.
log
(
"reateStoreage.get('globalConfig')"
,
createStoreage
.
get
(
'globalConfig'
))
registerMicroApps
(
registerMicroApps
(
entrys
.
map
(
item
=>
{
entrys
.
map
(
item
=>
{
item
.
loader
=
loader
;
item
.
loader
=
loader
;
...
...
src/pages/user/login/login.js
View file @
63159031
...
@@ -227,7 +227,7 @@ class Login {
...
@@ -227,7 +227,7 @@ class Login {
if
(
self
.
globalConfig
.
hasOwnProperty
(
'webConfig'
))
{
if
(
self
.
globalConfig
.
hasOwnProperty
(
'webConfig'
))
{
self
.
globalConfig
=
{
self
.
globalConfig
=
{
...
self
.
globalConfig
,
//
...self.globalConfig,
...
self
.
globalConfig
.
webConfig
.
basicConfig
,
...
self
.
globalConfig
.
webConfig
.
basicConfig
,
...
self
.
globalConfig
.
webConfig
.
optionalConfig
...
self
.
globalConfig
.
webConfig
.
optionalConfig
}
}
...
@@ -690,6 +690,7 @@ class Login {
...
@@ -690,6 +690,7 @@ class Login {
/* eslint-disable */
/* eslint-disable */
let
_industrySite
=
null
;
let
_industrySite
=
null
;
if
(
industry
)
{
if
(
industry
)
{
const
userInfo
=
const
userInfo
=
self
.
globalConfig
.
userInfo
&&
self
.
globalConfig
.
userInfo
&&
self
.
globalConfig
.
userInfo
.
Groups
&&
self
.
globalConfig
.
userInfo
.
Groups
&&
...
@@ -741,7 +742,7 @@ class Login {
...
@@ -741,7 +742,7 @@ class Login {
self
.
globalConfig
.
userInfo
=
Object
.
assign
(
self
.
globalConfig
.
userInfo
=
Object
.
assign
(
{},
{},
response
,
response
,
self
.
globalConfig
.
userInfo
,
//
self.globalConfig.userInfo,
);
);
if
(
response
.
hasOwnProperty
(
'data'
))
{
if
(
response
.
hasOwnProperty
(
'data'
))
{
self
.
globalConfig
.
userInfo
=
{
self
.
globalConfig
.
userInfo
=
{
...
...
src/utils/event.js
View file @
63159031
...
@@ -6,4 +6,9 @@ store.on('event:route', (url) => {
...
@@ -6,4 +6,9 @@ store.on('event:route', (url) => {
window
.
share
&&
window
.
share
.
event
&&
window
.
share
.
event
.
on
(
'event:logs'
,
params
=>
{
window
.
share
&&
window
.
share
.
event
&&
window
.
share
.
event
.
on
(
'event:logs'
,
params
=>
{
delete
params
.
site
;
delete
params
.
site
;
appService
.
pvLogs
(
params
);
appService
.
pvLogs
(
params
);
})
});
// store.on('event:logout', () => {
// window.globalConfig = {};
// })
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