UserLayout.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. import React, { Fragment } from 'react';
  2. import { Link } from 'dva/router';
  3. import { Icon } from 'antd';
  4. import GlobalFooter from '../../components/GlobalFooter';
  5. import styles from './UserLayout.less';
  6. import logo from '../../assets/logo.svg';
  7. const links = [
  8. {
  9. key: 'help',
  10. title: '帮助',
  11. href: '',
  12. },
  13. {
  14. key: 'privacy',
  15. title: '隐私',
  16. href: '',
  17. },
  18. {
  19. key: 'terms',
  20. title: '条款',
  21. href: '',
  22. },
  23. ];
  24. const copyright = (
  25. <Fragment>
  26. Copyright <Icon type="copyright" /> 2018 蚂蚁金服体验技术部出品
  27. </Fragment>
  28. );
  29. class UserLayout extends React.PureComponent {
  30. // @TODO title
  31. // getPageTitle() {
  32. // const { routerData, location } = this.props;
  33. // const { pathname } = location;
  34. // let title = 'Ant Design Pro';
  35. // if (routerData[pathname] && routerData[pathname].name) {
  36. // title = `${routerData[pathname].name} - Ant Design Pro`;
  37. // }
  38. // return title;
  39. // }
  40. render() {
  41. const { children } = this.props;
  42. return (
  43. // @TODO <DocumentTitle title={this.getPageTitle()}>
  44. <div className={styles.container}>
  45. <div className={styles.content}>
  46. <div className={styles.top}>
  47. <div className={styles.header}>
  48. <Link to="/">
  49. <img alt="logo" className={styles.logo} src={logo} />
  50. <span className={styles.title}>Ant Design</span>
  51. </Link>
  52. </div>
  53. <div className={styles.desc}>Ant Design 是西湖区最具影响力的 Web 设计规范</div>
  54. </div>
  55. {children}
  56. </div>
  57. <GlobalFooter links={links} copyright={copyright} />
  58. </div>
  59. );
  60. }
  61. }
  62. export default UserLayout;