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
5ff91f02
Commit
5ff91f02
authored
Mar 11, 2022
by
李纪文
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-cloud' into 'master'
Dev cloud See merge request
!6
parents
9f6f935a
28f1ee66
Pipeline
#45720
passed with stages
in 2 minutes 14 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
30 deletions
+23
-30
initConfig.js
src/initConfig.js
+1
-0
BasicLayout1.js
src/layouts/BasicLayout1.js
+4
-2
Site.js
src/layouts/Site.js
+4
-0
index.js
src/pages/bootpage/index.js
+10
-21
index.less
src/pages/bootpage/index.less
+4
-6
login.js
src/pages/user/login/login.js
+0
-1
No files found.
src/initConfig.js
View file @
5ff91f02
...
...
@@ -64,6 +64,7 @@ export const initGlobalConfig = () => {
appService
.
queryConfig
({
client
:
client
||
'city'
,
ignoreSite
:
true
,
})
.
then
(
res
=>
{
if
(
res
)
{
...
...
src/layouts/BasicLayout1.js
View file @
5ff91f02
...
...
@@ -299,9 +299,11 @@ const BasicLayout = props => {
currentChildrenRoute
&&
currentChildrenRoute
.
routes
?
setChildrenRoutes
(
currentChildrenRoute
.
routes
):
setChildrenRoutes
([
currentChildrenRoute
]);
}
else
{
let
url
=
_
.
isString
(
props
.
global
.
get
(
'homepage'
))
let
url
=
props
.
global
&&
props
.
global
.
hasOwnProperty
(
'get'
)
&&
props
.
global
.
get
(
'homepage'
)
?
_
.
isString
(
props
.
global
.
get
(
'homepage'
))
?
props
.
global
.
get
(
'homepage'
)
:
props
.
global
.
get
(
'homepage.url'
);
:
props
.
global
.
get
(
'homepage.url'
)
:
''
;
if
(
!
props
.
global
.
get
(
'home'
))
{
url
=
`civweb4/
${
url
.
replace
(
/^
\/
/
,
''
).
replace
(
/^civweb4
\/
/
,
''
)}
`
}
...
...
src/layouts/Site.js
View file @
5ff91f02
...
...
@@ -14,6 +14,8 @@ import { appService } from '../api';
import
CitySelector
from
'../components/CitySelector'
;
import
Login
from
'../pages/user/login/login'
;
import
styles
from
'./UserLayout.less'
;
import
{
initMicroApps
}
from
'@/micro'
;
const
{
Link
}
=
Anchor
;
...
...
@@ -343,6 +345,8 @@ class Site {
// eslint-disable-next-line no-unused-expressions
self
.
props
.
updateCurrentIndex
&&
self
.
props
.
updateCurrentIndex
(
0
);
initMicroApps
();
// 切换站点后,重置掉三级菜单
const
homeType
=
self
.
globalConfig
.
homeType
||
'civweb4'
;
const
homePath
=
...
...
src/pages/bootpage/index.js
View file @
5ff91f02
...
...
@@ -58,11 +58,14 @@ const renderIndustries = (config, callback) =>
}
});
let
loginAction
=
null
;
//
let loginAction = null;
const
BootPage
=
props
=>
{
const
[
loadding
,
setLoadding
]
=
useState
(
false
);
const
[
hasRole
,
setHasRole
]
=
useState
(
false
);
const
[
scale
,
setScale
]
=
useState
(
1
);
const
[
loginAction
,
setAction
]
=
useState
(
()
=>
new
LoginAction
(
props
),
);
const
history
=
useHistory
();
useDocumentTitle
(
{
title
:
defaultSetting
.
title
,
id
:
''
,
pageName
:
'行业切换'
},
...
...
@@ -80,18 +83,6 @@ const BootPage = props => {
props
.
instance
&&
props
.
instance
.
updateConfig
(
config
);
// props.instance && props.instance.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}`);
// 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
...
...
@@ -106,22 +97,20 @@ const BootPage = props => {
};
useEffect
(()
=>
{
window
.
addEventListener
(
'resize'
,
handleResize
);
loginAction
=
new
LoginAction
(
props
);
loginAction
.
events
.
on
(
'toggleIndustry'
,
event
=>
{
const
handleToggleIndustry
=
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'
,
handleToggleIndustry
);
return
()
=>
{
window
.
removeEventListener
(
'resize'
,
handleResize
);
loginAction
.
events
.
remove
AllListeners
(
'toggleIndustry'
);
loginAction
.
events
.
remove
Listener
(
'toggleIndustry'
,
handleToggleIndustry
);
};
});
}
,
[]
);
const
renderIndustr
=
useMemo
(
()
=>
renderIndustries
(
props
.
global
,
handlePage
),
[],
...
...
src/pages/bootpage/index.less
View file @
5ff91f02
...
...
@@ -53,12 +53,10 @@
width: 2px;
}
.bootPageUl {
// display: flex;
// width: 1280px;
// flex-wrap: wrap;
// justify-content: center;
display: grid;
grid-template-columns: repeat(4, 25%);
display: flex;
width: 1280px;
flex-wrap: wrap;
justify-content: center;
list-style: none;
transition: all .5s ease-out;
overflow: hidden;
...
...
src/pages/user/login/login.js
View file @
5ff91f02
...
...
@@ -857,7 +857,6 @@ class Login {
}
login
(
usr
,
pwd
,
userPhone
,
isRememberPWD
,
mode
=
SERVICE_APP_LOGIN_MODE
.
password
)
{
this
.
events
.
removeAllListeners
(
'loginError'
);
const
self
=
this
;
if
(
window
.
globalConfig
&&
window
.
globalConfig
.
hasGateWay
)
{
usr
=
userPhone
?
userPhone
:
usr
;
...
...
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