Commit c428b7f9 authored by 邓晓峰's avatar 邓晓峰

feat: add PageContainer component

parent bf8c0f9d
...@@ -9,12 +9,12 @@ export default { ...@@ -9,12 +9,12 @@ export default {
// container: '#micro-container', // container: '#micro-container',
// activeRule: '/civbase/dosing-web', // activeRule: '/civbase/dosing-web',
// }, // },
// { {
// name: 'civ_water', name: 'civ_water',
// entry: `//${window.location.hostname}:8080/civ_water`, entry: `//${window.location.hostname}:8081/civ_water`,
// container: '#micro-container', container: '#micro-container',
// activeRule: '/civbase/civ_water', activeRule: '/civbase/civ_water',
// }, },
// { // {
// name: 'civ_configuration', // name: 'civ_configuration',
// entry: `//${window.location.hostname}:8080/civ_configuration`, // entry: `//${window.location.hostname}:8080/civ_configuration`,
......
...@@ -110,9 +110,9 @@ ...@@ -110,9 +110,9 @@
"@wisdom-map/Map": "^1.0.12-17", "@wisdom-map/Map": "^1.0.12-17",
"@wisdom-map/arcgismap": "^1.0.79-17", "@wisdom-map/arcgismap": "^1.0.79-17",
"@wisdom-map/util": "^1.0.27-0", "@wisdom-map/util": "^1.0.27-0",
"@wisdom-utils/components": "0.0.100", "@wisdom-utils/components": "0.1.8",
"@wisdom-utils/runtime": "0.0.15", "@wisdom-utils/runtime": "0.0.15",
"@wisdom-utils/utils": "0.1.38", "@wisdom-utils/utils": "0.1.48",
"animate.css": "^4.1.1", "animate.css": "^4.1.1",
"antd": "^4.17.4", "antd": "^4.17.4",
"compression": "1.7.4", "compression": "1.7.4",
......
This diff is collapsed.
import React from 'react';
const Layout = ({ children }) => <>{children}</>;
export default Layout;
import React from 'react';
import { Helmet, HelmetProvider } from 'react-helmet-async';
import { connect } from 'react-redux';
import { getMenuData, getPageTitle } from '@ant-design/pro-layout';
// import { renderRoutes } from '../utils/routes';
import { helpers } from '@wisdom-utils/utils';
import styles from './UserLayout.less';
const { renderRoutes } = helpers;
const UserLayout = props => {
const {
route = {
routes: [],
},
} = props;
const { breadcrumb } = getMenuData(route.routes);
const title = getPageTitle({
breadcrumb,
title: (props.global && props.global.title) || '',
...props,
});
return (
<HelmetProvider>
<Helmet>
<title>{title}</title>
<link
rel="shortcut icon"
href={`https://panda-water.cn/web4/${props.global &&
props.global.shortcutIcon}`}
/>
<meta name="description" content={title} />
</Helmet>
<div className={styles.container}>
<div className={styles.content}>
{renderRoutes('panda-console-base', route.routes, props)}
{props.children}
</div>
{/* <DefaultFooter links={[]} copyright="Copyright © 熊猫智慧水务 2020 All Rights Reserved 沪ICP备11036640-1"/> */}
</div>
</HelmetProvider>
);
};
const mapStateToProps = state => ({
global: state.getIn(['global', 'globalConfig']),
});
export default connect(mapStateToProps)(UserLayout);
This diff is collapsed.
...@@ -2,7 +2,7 @@ import LoadingComponent from '@ant-design/pro-layout/es/PageLoading'; ...@@ -2,7 +2,7 @@ import LoadingComponent from '@ant-design/pro-layout/es/PageLoading';
import { dynamic } from '@wisdom-utils/runtime'; import { dynamic } from '@wisdom-utils/runtime';
import BasicLayout from '../layouts/BasicLayout'; import BasicLayout from '../layouts/BasicLayout';
import UserLayout from '../layouts/UserLayout'; import { UserLayout } from '@wisdom-utils/components/lib/AppLayout';
import BootPage from '../pages/bootpage'; import BootPage from '../pages/bootpage';
import Iframe from '../pages/iframe'; import Iframe from '../pages/iframe';
import Login from '../pages/user/login'; import Login from '../pages/user/login';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment