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
3 years ago
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';
import
Cookies
from
'js-cookie'
;
import
AppConfig
from
'kit_global_config'
;
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
pkg
from
'../../../../package.json'
;
import
defaultSetting
from
'../../../../config/defaultSetting'
;
...
...
@@ -139,6 +139,7 @@ const appReducer = (state = initialState, action) => {
Cookies
.
set
(
'city'
,
Cookies
.
get
(
'city'
)
||
window
.
globalConfig
.
client
);
window
.
globalConfig
=
config
;
return
state
.
merge
({
globalConfig
:
config
,
menu
:
generMenu
||
[],
...
...
@@ -229,6 +230,7 @@ const appReducer = (state = initialState, action) => {
microMounted
:
action
.
data
,
});
case
LOGINOUT
:
event
.
emit
(
'event: application-logout'
,
action
.
data
);
return
state
.
merge
({
complexConfig
:
action
.
data
.
complexConfig
,
currentMenuIndex
:
action
.
data
.
currentMenuIndex
,
...
...
This diff is collapsed.
Click to expand it.
src/initConfig.js
View file @
63159031
...
...
@@ -11,7 +11,7 @@ export const initGlobalConfig = (loader, store, render) => {
// eslint-disable-next-line no-debugger
// eslint-disable-next-line no-undef
createStoreage
.
remove
(
`__PANDA_STORE__
${
location
.
hostname
}
`
);
window
.
globalConfig
=
{};
let
config
=
createStoreage
.
get
(
'globalConfig'
)
||
{};
store
.
dispatch
(
actionCreators
.
updateComplexConfig
({}));
if
(
!
getToken
()
||
config
.
token
==
null
)
{
...
...
@@ -74,6 +74,7 @@ export const initGlobalConfig = (loader, store, render) => {
Object
.
assign
({},
data
,
{
token
:
''
,
access_token
:
''
,
userInfo
:
null
}),
),
);
...
...
This diff is collapsed.
Click to expand it.
src/layouts/BasicLayout1.js
View file @
63159031
...
...
@@ -426,7 +426,7 @@ const BasicLayout = props => {
}
const
handleUpdateCurrentIndex
=
index
=>
{
debugger
setSelectIndex
(
-
1
)
props
.
updateCurrentIndex
(
index
);
window
.
share
&&
window
.
share
.
event
.
emit
(
'trigger:updateMenuIndex'
,
index
);
...
...
This diff is collapsed.
Click to expand it.
src/micro.js
View file @
63159031
...
...
@@ -34,7 +34,6 @@ const MICRO_STATUS = {
export
const
initMicroApps
=
(
loader
,
store
)
=>
{
/* eslint-disable */
const
config
=
createStoreage
.
get
(
'globalConfig'
);
const
application
=
config
&&
config
.
products
||
[];
let
products
=
[];
...
...
@@ -54,7 +53,7 @@ export const initMicroApps = (loader, store) => {
process
.
env
.
NODE_ENV
!==
'production'
?
micorConfig
.
dev
:
products
;
console
.
log
(
"reateStoreage.get('globalConfig')"
,
createStoreage
.
get
(
'globalConfig'
))
registerMicroApps
(
entrys
.
map
(
item
=>
{
item
.
loader
=
loader
;
...
...
This diff is collapsed.
Click to expand it.
src/pages/user/login/login.js
View file @
63159031
...
...
@@ -227,7 +227,7 @@ class Login {
if
(
self
.
globalConfig
.
hasOwnProperty
(
'webConfig'
))
{
self
.
globalConfig
=
{
...
self
.
globalConfig
,
//
...self.globalConfig,
...
self
.
globalConfig
.
webConfig
.
basicConfig
,
...
self
.
globalConfig
.
webConfig
.
optionalConfig
}
...
...
@@ -690,6 +690,7 @@ class Login {
/* eslint-disable */
let
_industrySite
=
null
;
if
(
industry
)
{
const
userInfo
=
self
.
globalConfig
.
userInfo
&&
self
.
globalConfig
.
userInfo
.
Groups
&&
...
...
@@ -741,7 +742,7 @@ class Login {
self
.
globalConfig
.
userInfo
=
Object
.
assign
(
{},
response
,
self
.
globalConfig
.
userInfo
,
//
self.globalConfig.userInfo,
);
if
(
response
.
hasOwnProperty
(
'data'
))
{
self
.
globalConfig
.
userInfo
=
{
...
...
This diff is collapsed.
Click to expand it.
src/utils/event.js
View file @
63159031
...
...
@@ -6,4 +6,9 @@ store.on('event:route', (url) => {
window
.
share
&&
window
.
share
.
event
&&
window
.
share
.
event
.
on
(
'event:logs'
,
params
=>
{
delete
params
.
site
;
appService
.
pvLogs
(
params
);
})
});
// store.on('event:logout', () => {
// window.globalConfig = {};
// })
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