import React from 'react';
import PropTypes from 'prop-types';
import { Link, Route } from 'dva/router';
import DocumentTitle from 'react-document-title';
import { Icon } from 'antd';
import GlobalFooter from '../components/GlobalFooter';
import styles from './UserLayout.less';
import { getRouteData } from '../utils/utils';
const links = [{
title: '帮助',
href: '',
}, {
title: '隐私',
href: '',
}, {
title: '条款',
href: '',
}];
const copyright =
Copyright 2017 蚂蚁金服体验技术部出品
;
class UserLayout extends React.PureComponent {
static childContextTypes = {
location: PropTypes.object,
}
getChildContext() {
const { location } = this.props;
return { location };
}
getPageTitle() {
const { location } = this.props;
const { pathname } = location;
let title = 'Ant Design Pro';
getRouteData('UserLayout').forEach((item) => {
if (item.path === pathname) {
title = `${item.name} - Ant Design Pro`;
}
});
return title;
}
getRouteComponent(item) {
if (this.routeComponents[item.path]) {
return this.routeComponents[item.path];
}
const component = item.component(this.props.app);
this.routeComponents[item.path] = component;
return component;
}
routeComponents = {};
render() {
return (
Ant Design
Ant Design 是西湖区最具影响力的 Web 设计规范
{
getRouteData('UserLayout').map(item =>
(
)
)
}
);
}
}
export default UserLayout;