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
923065c1
Commit
923065c1
authored
Mar 01, 2022
by
崔佳豪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: toggleIndustry 事件清除
parent
e9057518
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
12 deletions
+26
-12
index.js
src/pages/bootpage/index.js
+26
-12
No files found.
src/pages/bootpage/index.js
View file @
923065c1
...
...
@@ -56,6 +56,7 @@ const renderIndustries = (config, callback) =>
}
});
let
loginAction
=
null
;
const
BootPage
=
props
=>
{
const
[
loadding
,
setLoadding
]
=
useState
(
false
);
...
...
@@ -70,24 +71,25 @@ const BootPage = props => {
event
.
preventDefault
();
setLoadding
(
true
);
const
config
=
props
.
global
;
const
loginAction
=
new
LoginAction
(
props
);
//
const loginAction = new LoginAction(props);
config
.
uiwidgets
=
[];
config
.
widgets
=
[];
config
.
allWidgets
=
[];
props
.
instance
&&
props
.
instance
.
updateConfig
(
config
);
// props.instance && props.instance.getUserInfoAndConfig('', true, type);
loginAction
.
getUserInfoAndConfig
(
''
,
true
,
type
);
loginAction
&&
loginAction
.
getUserInfoAndConfig
(
''
,
true
,
type
);
// eslint-disable-next-line no-shadow
loginAction
.
events
.
on
(
'toggleIndustry'
,
event
=>
{
setLoadding
(
false
);
// props.history.push(`/?client=${props.global.client}`);
initMicroApps
();
// 加载首页
history
.
push
(
props
.
global
.
homepage
??
`/?client=
${
props
.
global
.
client
}
`
);
window
.
share
.
event
.
emit
(
'triggerMicro'
,
props
.
global
);
props
.
updateCurrentIndex
(
0
);
// window.location.reload();
});
// loginAction.events.on('toggleIndustry', event => {
// setLoadding(false);
// // props.history.push(`/?client=${props.global.client}`);
// debugger
// initMicroApps();
// // 加载首页
// history.push(props.global.homepage ?? `/?client=${props.global.client}`);
// window.share.event.emit('triggerMicro', props.global);
// props.updateCurrentIndex(0);
// // window.location.reload();
// });
},
[]);
useEffect
(()
=>
{
// eslint-disable-next-line no-use-before-define
...
...
@@ -102,8 +104,20 @@ const BootPage = props => {
};
useEffect
(()
=>
{
window
.
addEventListener
(
'resize'
,
handleResize
);
loginAction
=
new
LoginAction
(
props
);
loginAction
.
events
.
on
(
'toggleIndustry'
,
async
(
event
)
=>
{
setLoadding
(
false
);
props
.
history
.
push
(
`/?client=
${
props
.
global
.
client
}
`
);
initMicroApps
();
// 加载首页
// history.push(props.global.homepage ?? `/?client=${props.global.client}`);
window
.
share
.
event
.
emit
(
'triggerMicro'
,
props
.
global
);
props
.
updateCurrentIndex
(
0
);
// window.location.reload();
});
return
()
=>
{
window
.
removeEventListener
(
'resize'
,
handleResize
);
loginAction
.
events
.
removeAllListeners
(
'toggleIndustry'
);
};
});
const
renderIndustr
=
useMemo
(
...
...
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