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
6a5e9f34
Commit
6a5e9f34
authored
Jul 03, 2024
by
杨思琦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 懒加载逻辑修改
parent
eb3b68a5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
69 additions
and
89 deletions
+69
-89
webpack.prod.babel.js
internals/webpack/webpack.prod.babel.js
+4
-1
index.js
src/containers/App/index.js
+17
-13
BasicLayout.js
src/layouts/BasicLayout.js
+1
-23
BasicLayout_tags.js
src/layouts/BasicLayout_tags.js
+0
-0
HN.less
src/layouts/HN.less
+0
-0
HNLayout.js
src/layouts/HNLayout.js
+0
-0
index.js
src/pages/user/login/index.js
+46
-51
config.js
src/routes/config.js
+1
-1
No files found.
internals/webpack/webpack.prod.babel.js
View file @
6a5e9f34
...
@@ -59,7 +59,10 @@ module.exports = require('./webpack.base.babel')({
...
@@ -59,7 +59,10 @@ module.exports = require('./webpack.base.babel')({
test
:
/
[\\/]
node_modules
[\\/]
/
,
test
:
/
[\\/]
node_modules
[\\/]
/
,
name
(
module
)
{
name
(
module
)
{
const
packageName
=
module
.
context
.
match
(
/
[\\/]
node_modules
[\\/](
.*
?)([\\/]
|$
)
/
)[
1
];
const
packageName
=
module
.
context
.
match
(
/
[\\/]
node_modules
[\\/](
.*
?)([\\/]
|$
)
/
)[
1
];
return
`npm.
${
packageName
.
replace
(
'@'
,
''
)}
`
;
// @ts-ignore
if
(
module
.
type
!==
'css/mini-extract'
)
{
return
`npm.
${
packageName
.
replace
(
'@'
,
''
)}
`
;
}
},
},
},
},
bizComponent
:
{
bizComponent
:
{
...
...
src/containers/App/index.js
View file @
6a5e9f34
/* eslint-disable global-require */
/* eslint-disable global-require */
import
React
,
{
useEffect
}
from
'react'
;
import
React
,
{
useEffect
,
Suspense
}
from
'react'
;
import
{
Helmet
}
from
'react-helmet'
;
import
{
Helmet
}
from
'react-helmet'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
...
@@ -37,6 +37,21 @@ const App = props => {
...
@@ -37,6 +37,21 @@ const App = props => {
<
Router
basename
=
{
config
.
base
||
pkg
.
name
.
toLocaleLowerCase
()
||
''
}
>
<
Router
basename
=
{
config
.
base
||
pkg
.
name
.
toLocaleLowerCase
()
||
''
}
>
{
window
?.
qiankunIsCache
?
(
{
window
?.
qiankunIsCache
?
(
<
AliveScope
>
<
AliveScope
>
<
Suspense
fallback
=
{
<><
/>}
>
<
Switch
>
{
renderRoutes
(
'panda-console-base'
,
dyRoutes
(
props
.
menu
||
[],
props
.
global
&&
props
.
global
.
layout
,
(
props
.
global
&&
props
.
global
.
theme
)
||
'dark'
,
).
routes
,
)}
<
/Switch
>
<
/Suspense
>
<
/AliveScope
>
)
:
(
<
Suspense
fallback
=
{
<><
/>}
>
<
Switch
>
<
Switch
>
{
renderRoutes
(
{
renderRoutes
(
'panda-console-base'
,
'panda-console-base'
,
...
@@ -47,18 +62,7 @@ const App = props => {
...
@@ -47,18 +62,7 @@ const App = props => {
).
routes
,
).
routes
,
)}
)}
<
/Switch
>
<
/Switch
>
<
/AliveScope
>
<
/Suspense
>
)
:
(
<
Switch
>
{
renderRoutes
(
'panda-console-base'
,
dyRoutes
(
props
.
menu
||
[],
props
.
global
&&
props
.
global
.
layout
,
(
props
.
global
&&
props
.
global
.
theme
)
||
'dark'
,
).
routes
,
)}
<
/Switch
>
)}
)}
<
/Router
>
<
/Router
>
<
/
>
<
/
>
...
...
src/layouts/BasicLayout.js
View file @
6a5e9f34
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
/* eslint-disable react-hooks/rules-of-hooks */
/* eslint-disable react-hooks/rules-of-hooks */
/* eslint-disable global-require */
/* eslint-disable global-require */
// @eslint-disable
// @eslint-disable
import
React
,
{
Suspense
,
useEffect
,
useRef
,
useState
,
useContext
}
from
'react'
;
import
React
,
{
useEffect
,
useRef
,
useState
,
useContext
}
from
'react'
;
import
{
ConfigProvider
,
Anchor
,
Modal
,
Popover
,
Radio
,
Spin
,
notification
,
Button
}
from
'antd'
;
import
{
ConfigProvider
,
Anchor
,
Modal
,
Popover
,
Radio
,
Spin
,
notification
,
Button
}
from
'antd'
;
import
classNames
from
'classnames'
;
import
classNames
from
'classnames'
;
...
@@ -773,28 +773,6 @@ const Layout = props => {
...
@@ -773,28 +773,6 @@ const Layout = props => {
: <></>
: <></>
)}
)}
>
>
{/* <Suspense fallback={<></>}> */}
{/* {window.location.pathname.startsWith('/civbase/civ_3d') ? ( */}
{/* <KeepAlive> */}
{/* <CesiumMap /> */}
{/* </KeepAlive> */}
{/* ) : window.location.pathname.startsWith('/civbase/civ_webgis') ? ( */}
{/* mapMode === 'AMap' ? ( */}
{/* <AMap /> */}
{/* ) : ( */}
{/* <ArcgisMap options={{ type: 'ArcgisMap' }} /> */}
{/* ) */}
{/* ) : null} */}
{/* <AliveScope> */}
{/* {window.location.pathname.startsWith('/civbase/civ_drainage/map') || isHaveMap() ? (
<KeepAlive when={true}>
<CesiumMap />
</KeepAlive>
) : (
window.location.pathname.startsWith('/civbase/civ_webgis') && null
)} */}
{/* </AliveScope> */}
{/* </Suspense> */}
<div id="micro-container" className="subapp-container">
<div id="micro-container" className="subapp-container">
{props.children}
{props.children}
...
...
src/layouts/BasicLayout_tags.js
deleted
100644 → 0
View file @
eb3b68a5
This diff is collapsed.
Click to expand it.
src/layouts/HN.less
deleted
100644 → 0
View file @
eb3b68a5
This diff is collapsed.
Click to expand it.
src/layouts/HNLayout.js
deleted
100644 → 0
View file @
eb3b68a5
This diff is collapsed.
Click to expand it.
src/pages/user/login/index.js
View file @
6a5e9f34
...
@@ -6,54 +6,53 @@
...
@@ -6,54 +6,53 @@
* @FilePath: \CivWeb\src\pages\user\login\index.js
* @FilePath: \CivWeb\src\pages\user\login\index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
*/
import
React
,
{
useEffect
,
Suspense
}
from
'react'
;
import
React
,
{
useEffect
}
from
'react'
;
import
{
AppInitState
}
from
'../../../render'
;
import
BaseLogin
from
'./template/baseLogin'
;
import
ChangShuiJiChang
from
'./template/changShuiJiChang'
;
import
NewYear
from
'./template/newYear'
;
import
baseLoginNewYear
from
'./template/baseLoginNewYear'
;
import
InfoLogin
from
'./template/infoLogin'
;
import
Yulin
from
'./template/yulin'
;
// import { useParams } from '@wisdom-utils/runtime';
import
EnergyQuota
from
'./template/energy_quota/index'
;
import
drainageXindu
from
'./template/drainage_xindu/index'
;
import
EnergGz
from
'./template/energy_GZ/index'
;
import
EnergGzV2
from
'./template/energy_GZV2/index'
;
// 广州单点登录跳转
import
EnergJS2
from
'./template/energy_JS2/index'
;
import
DarkNoEffect
from
'./template/noEffect/DarkNoEffect'
;
import
CloudLogin
from
'./template/cloud'
;
import
CloudNewLogin
from
'./template/cloudNew'
;
import
WaterLogin
from
'./template/water'
;
import
JSZHLogin
from
'./template/project/JSZH'
;
import
ChengmaiLogin
from
'./template/project/chengmai'
;
import
HuhehaoteLogin
from
'./template/project/huhehaote'
;
import
XinganLogin
from
'./template/project/xingan'
;
import
LvchengLogin
from
'./template/project/lvcheng'
;
import
PukouLogin
from
'./template/project/pukou'
;
import
JiLinDaXueLogin
from
'./template/project/JiLinDaXue'
;
import
ErlianhaoteLogin
from
'./template/project/erlianhaote'
;
import
YixianLogin
from
'./template/project/yixian'
;
import
LixianLogin
from
'./template/project/lixian'
;
import
DazuLogin
from
'./template/project/dazu'
;
import
WeixinLogin
from
'./template/project/weixin'
;
import
PanoramaLogin
from
'./template/panorama'
;
import
PanoramaLogin
from
'./template/panorama'
;
import
JiangXi
from
'./template/project/jiangxi'
;
import
JiangXiNew
from
'./template/project/jiangxiNew'
;
import
JiangXiNew
from
'./template/project/jiangxiNew'
;
import
Queshan
from
'./template/project/queshan'
;
const
BaseLogin
=
React
.
lazy
(()
=>
import
(
'./template/baseLogin'
));
import
Queshansl
from
'./template/project/queshansl'
;
const
ChangShuiJiChang
=
React
.
lazy
(()
=>
import
(
'./template/changShuiJiChang'
));
import
PiZhouLogin
from
'./template/project/pizhou'
;
const
NewYear
=
React
.
lazy
(()
=>
import
(
'./template/newYear'
));
import
JieshouLogin
from
'./template/project/jieshou'
;
const
baseLoginNewYear
=
React
.
lazy
(()
=>
import
(
'./template/baseLoginNewYear'
));
import
YongjiLogin
from
'./template/project/yongji'
;
const
InfoLogin
=
React
.
lazy
(()
=>
import
(
'./template/infoLogin'
));
import
DanlingLogin
from
'./template/project/danling'
;
const
Yulin
=
React
.
lazy
(()
=>
import
(
'./template/yulin'
));
import
PulandianLogin
from
'./template/project/pulandian'
;
const
EnergyQuota
=
React
.
lazy
(()
=>
import
(
'./template/energy_quota/index'
));
import
HeilongjiangzhixiaoLogin
from
'./template/project/heilongjiang'
;
const
drainageXindu
=
React
.
lazy
(()
=>
import
(
'./template/drainage_xindu/index'
));
import
GaoyaoLogin
from
'./template/project/gaoyao'
;
const
EnergGz
=
React
.
lazy
(()
=>
import
(
'./template/energy_GZ/index'
));
import
JianzhaLogin
from
'./template/project/jianzha'
;
const
EnergGzV2
=
React
.
lazy
(()
=>
import
(
'./template/energy_GZV2/index'
));
// 广州单点登录跳转
import
ChinaShuiwu
from
'./template/project/chinaShuiwu'
;
const
EnergJS2
=
React
.
lazy
(()
=>
import
(
'./template/energy_JS2/index'
));
import
current
from
'./template/current/index'
;
const
DarkNoEffect
=
React
.
lazy
(()
=>
import
(
'./template/noEffect/DarkNoEffect'
));
import
Linyou
from
'./template/project/linyou'
;
const
CloudLogin
=
React
.
lazy
(()
=>
import
(
'./template/cloud'
));
import
FengqiuLogin
from
'./template/project/fengqiu'
;
const
CloudNewLogin
=
React
.
lazy
(()
=>
import
(
'./template/cloudNew'
));
import
{
AppInitState
}
from
'../../../render'
;
const
WaterLogin
=
React
.
lazy
(()
=>
import
(
'./template/water'
));
const
JSZHLogin
=
React
.
lazy
(()
=>
import
(
'./template/project/JSZH'
));
const
ChengmaiLogin
=
React
.
lazy
(()
=>
import
(
'./template/project/chengmai'
));
const
HuhehaoteLogin
=
React
.
lazy
(()
=>
import
(
'./template/project/huhehaote'
));
const
XinganLogin
=
React
.
lazy
(()
=>
import
(
'./template/project/xingan'
));
const
LvchengLogin
=
React
.
lazy
(()
=>
import
(
'./template/project/lvcheng'
));
const
PukouLogin
=
React
.
lazy
(()
=>
import
(
'./template/project/pukou'
));
const
JiLinDaXueLogin
=
React
.
lazy
(()
=>
import
(
'./template/project/JiLinDaXue'
));
const
ErlianhaoteLogin
=
React
.
lazy
(()
=>
import
(
'./template/project/erlianhaote'
));
const
YixianLogin
=
React
.
lazy
(()
=>
import
(
'./template/project/yixian'
));
const
LixianLogin
=
React
.
lazy
(()
=>
import
(
'./template/project/lixian'
));
const
DazuLogin
=
React
.
lazy
(()
=>
import
(
'./template/project/dazu'
));
const
WeixinLogin
=
React
.
lazy
(()
=>
import
(
'./template/project/weixin'
));
const
JiangXi
=
React
.
lazy
(()
=>
import
(
'./template/project/jiangxi'
));
const
Queshan
=
React
.
lazy
(()
=>
import
(
'./template/project/queshan'
));
const
Queshansl
=
React
.
lazy
(()
=>
import
(
'./template/project/queshansl'
));
const
PiZhouLogin
=
React
.
lazy
(()
=>
import
(
'./template/project/pizhou'
));
const
JieshouLogin
=
React
.
lazy
(()
=>
import
(
'./template/project/jieshou'
));
const
YongjiLogin
=
React
.
lazy
(()
=>
import
(
'./template/project/yongji'
));
const
DanlingLogin
=
React
.
lazy
(()
=>
import
(
'./template/project/danling'
));
const
PulandianLogin
=
React
.
lazy
(()
=>
import
(
'./template/project/pulandian'
));
const
HeilongjiangzhixiaoLogin
=
React
.
lazy
(()
=>
import
(
'./template/project/heilongjiang'
));
const
GaoyaoLogin
=
React
.
lazy
(()
=>
import
(
'./template/project/gaoyao'
));
const
JianzhaLogin
=
React
.
lazy
(()
=>
import
(
'./template/project/jianzha'
));
const
ChinaShuiwu
=
React
.
lazy
(()
=>
import
(
'./template/project/chinaShuiwu'
));
const
current
=
React
.
lazy
(()
=>
import
(
'./template/current/index'
));
const
Linyou
=
React
.
lazy
(()
=>
import
(
'./template/project/linyou'
));
const
FengqiuLogin
=
React
.
lazy
(()
=>
import
(
'./template/project/fengqiu'
));
const
LoginTemplate
=
{
const
LoginTemplate
=
{
'新春.html'
:
baseLoginNewYear
,
'新春.html'
:
baseLoginNewYear
,
'新春 - 智联.html'
:
NewYear
,
'新春 - 智联.html'
:
NewYear
,
...
@@ -128,9 +127,5 @@ export default props => {
...
@@ -128,9 +127,5 @@ export default props => {
template
+=
'.html'
;
template
+=
'.html'
;
}
}
const
RenderComponent
=
LoginTemplate
[
template
]
?
LoginTemplate
[
template
]
:
LoginTemplate
[
'default'
];
const
RenderComponent
=
LoginTemplate
[
template
]
?
LoginTemplate
[
template
]
:
LoginTemplate
[
'default'
];
return
(
return
<
RenderComponent
{...
props
}
loginParams
=
{
loginParams
}
/>
;
<
Suspense
fallback
=
{
<><
/>}
>
<
RenderComponent
{...
props
}
loginParams
=
{
loginParams
}
/
>
<
/Suspense
>
)
};
};
src/routes/config.js
View file @
6a5e9f34
...
@@ -10,7 +10,6 @@ import UsingAnalysis from '../pages/cloud/analysis/using';
...
@@ -10,7 +10,6 @@ import UsingAnalysis from '../pages/cloud/analysis/using';
import
NewProducts
from
'../pages/cloud/introduction/newproducts'
;
import
NewProducts
from
'../pages/cloud/introduction/newproducts'
;
import
CommonMenu
from
'../pages/commonMenu'
;
import
CommonMenu
from
'../pages/commonMenu'
;
import
Iframe
from
'../pages/iframe'
;
import
Iframe
from
'../pages/iframe'
;
import
Login
from
'../pages/user/login'
;
import
NoSecret
from
'../pages/user/login/noSecret'
;
import
NoSecret
from
'../pages/user/login/noSecret'
;
import
Notifications
from
'../pages/system/notifications'
;
import
Notifications
from
'../pages/system/notifications'
;
import
TabIframe
from
'../pages/system/iframe/TabWidget'
;
import
TabIframe
from
'../pages/system/iframe/TabWidget'
;
...
@@ -20,6 +19,7 @@ import IntegratedLoginPage from '../pages/integratedLogin'; // 集成登录管
...
@@ -20,6 +19,7 @@ import IntegratedLoginPage from '../pages/integratedLogin'; // 集成登录管
import
ThirdParty
from
'../pages/thirdParty'
;
// 集成登录自定义跳转
import
ThirdParty
from
'../pages/thirdParty'
;
// 集成登录自定义跳转
import
PrevieView
from
'../pages/system/previews/preview'
;
import
PrevieView
from
'../pages/system/previews/preview'
;
const
Login
=
React
.
lazy
(()
=>
import
(
'../pages/user/login'
));
export
const
dyRoutes
=
(
routes
,
layout
,
theme
)
=>
{
export
const
dyRoutes
=
(
routes
,
layout
,
theme
)
=>
{
// eslint-disable-next-line no-shadow
// eslint-disable-next-line no-shadow
const
dyRoutes
=
routes
||
[];
const
dyRoutes
=
routes
||
[];
...
...
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