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
d7029e52
Commit
d7029e52
authored
Feb 24, 2022
by
崔佳豪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 行业切换注册应用及加载首页
parent
e66d65eb
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
8 deletions
+40
-8
Site.js
src/layouts/Site.js
+6
-5
index.js
src/pages/bootpage/index.js
+18
-1
index.less
src/pages/bootpage/index.less
+14
-0
login.js
src/pages/user/login/login.js
+1
-1
baseLogin.js
src/pages/user/login/template/baseLogin.js
+1
-1
No files found.
src/layouts/Site.js
View file @
d7029e52
...
...
@@ -342,11 +342,11 @@ class Site {
self
.
setLoading
(
false
);
// eslint-disable-next-line no-unused-expressions
self
.
props
.
updateCurrentIndex
&&
self
.
props
.
updateCurrentIndex
(
0
);
window
.
history
.
replaceState
(
''
,
''
,
`/
${
self
.
globalConfig
.
homepage
}
`
,
);
//
window.history.replaceState(
//
'',
//
'',
//
`/${self.globalConfig.homepage}`,
//
);
self
.
getCityStationsForUser
().
then
(
res
=>
{
window
.
share
.
event
.
emit
(
'updateSite'
,
res
);
});
...
...
@@ -357,6 +357,7 @@ class Site {
self
.
props
&&
self
.
props
.
updateComplexConfig
&&
self
.
props
.
updateComplexConfig
({});
self
.
props
.
history
&&
self
.
props
.
history
.
push
(
self
.
globalConfig
??
`/?client=
${
self
.
props
.
global
.
client
}
`
);
// window.location.reload();
window
.
share
.
event
.
emit
(
'triggerMicro'
,
this
.
props
.
global
);
});
...
...
src/pages/bootpage/index.js
View file @
d7029e52
...
...
@@ -12,6 +12,8 @@ import { actionCreators } from '../../containers/App/store';
import
SecurityLayout
from
'../../layouts/SecurityLayout'
;
import
LoginAction
from
'../user/login/login'
;
import
styles
from
'./index.less'
;
import
{
useHistory
}
from
'@wisdom-utils/runtime'
;
import
{
initMicroApps
}
from
'@/micro'
;
const
industries
=
[
{
name
:
'供水'
,
type
:
'供水'
,
subTitle
:
'WATER SUPPLY'
},
...
...
@@ -58,6 +60,7 @@ const BootPage = props => {
const
[
loadding
,
setLoadding
]
=
useState
(
false
);
const
[
scale
,
setScale
]
=
useState
(
1
);
const
history
=
useHistory
();
useDocumentTitle
(
{
title
:
defaultSetting
.
title
,
id
:
''
,
pageName
:
'行业切换'
},
props
.
global
.
title
||
defaultSetting
.
title
,
...
...
@@ -77,7 +80,10 @@ const BootPage = props => {
// eslint-disable-next-line no-shadow
loginAction
.
events
.
on
(
'toggleIndustry'
,
event
=>
{
setLoadding
(
false
);
props
.
history
.
push
(
`/?client=
${
props
.
global
.
client
}
`
);
// 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();
...
...
@@ -105,6 +111,12 @@ const BootPage = props => {
[],
);
const
intl
=
useIntl
();
// const toOMSUsingAnalysis = e => {
// e && e.stopPropagation();
// props.history.push(`/omsUsingAnalysis`);
// }
return
(
<
SecurityLayout
>
<
div
className
=
{
styles
.
bootPage
}
>
...
...
@@ -145,6 +157,11 @@ const BootPage = props => {
<
Spin
spinning
=
{
loadding
}
size
=
"large"
/>
<
/Space
>
<
/div
>
{
/* <div class={styles['cloud-using-anaylysis-btn']}>
<div class="" onClick={toOMSUsingAnalysis}>
<span>平台使用分析</span>
</div>
</div> */
}
<
/div
>
<
/SecurityLayout
>
);
...
...
src/pages/bootpage/index.less
View file @
d7029e52
...
...
@@ -126,6 +126,20 @@
left: 50%;
transform: translate(-50%, -50%);
}
.cloud-using-anaylysis-btn {
position: fixed;
height: 120px;
width: 100%;
bottom: 0px;
padding: 0 20px;
display: flex;
justify-content: end;
cursor: pointer;
color: #fff;
font-size: 20px;
}
}
@media screen and (max-width: 1440px) {
...
...
src/pages/user/login/login.js
View file @
d7029e52
...
...
@@ -227,7 +227,7 @@ class Login {
theme
:
self
.
globalConfig
.
theme
,
menu
:
self
.
globalConfig
.
menu
,
style
:
self
.
globalConfig
.
style
,
homepage
:
homeType
+
'/'
+
(
params
.
getParams
(
'redirect'
)
||
self
.
globalConfig
.
homepage
||
config
.
homepage
),
homepage
:
homeType
+
'/'
+
(
params
.
getParams
(
'redirect'
)
||
config
.
homepage
),
});
if
(
self
.
globalConfig
.
hasOwnProperty
(
'webConfig'
))
{
...
...
src/pages/user/login/template/baseLogin.js
View file @
d7029e52
...
...
@@ -62,7 +62,7 @@ const Login = forwardRef((props, _ref) => {
action
&&
action
.
events
.
on
(
'loginSuccess'
,
event
=>
{
setSubmitting
(
false
);
props
.
updateCurrentIndex
&&
props
.
updateCurrentIndex
(
0
);
props
.
history
.
push
(
`/`
);
//
props.history.push(`/`);
// debugger
// window.share.event.emit('triggerMicro', props.global);
initMicroApps
();
...
...
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