error page

This commit is contained in:
zuiidea
2016-10-16 23:05:18 +08:00
parent 0255f197f4
commit 23b32b332e
18 changed files with 30 additions and 641 deletions
+8 -16
View File
@@ -1,25 +1,17 @@
import React, { PropTypes } from 'react'
import { Menu, Icon } from 'antd'
import { Link } from 'dva/router'
import React, {PropTypes} from 'react'
import {Menu, Icon} from 'antd'
import {Link} from 'dva/router'
import styles from './main.less'
const SubMenu = Menu.SubMenu
function getMenuKeyFromUrl(pathname) {
let key = ''
try {
key = pathname.match(/\/([^\/]*)/i)[1]
/* eslint no-empty:0 */
} catch (e) {}
return key
}
function Header({ location }) {
console.log(getMenuKeyFromUrl(location.pathname),location.pathname);
function Header({location}) {
return (
<div className={styles.header}>
<Menu className="header-menu" mode="horizontal">
<SubMenu style={{float:'right'}} title={<span><Icon type="user" />吴彦祖</span>}>
<SubMenu style={{
float: 'right'
}} title={< span > <Icon type="user"/>吴彦祖 < /span>}>
<Menu.Item key="signOut">
<a>注销</a>
</Menu.Item>
@@ -30,7 +22,7 @@ function Header({ location }) {
}
Header.propTypes = {
location: PropTypes.object,
location: PropTypes.object
}
export default Header
+3 -11
View File
@@ -2,16 +2,8 @@ import React, {PropTypes} from 'react'
import styles from './main.less'
import {config} from '../../utils'
function Footer({location}) {
return (
<div className={styles.footer}>
{config.footerText}
</div>
)
}
Footer.propTypes = {
location: PropTypes.object
}
const Footer = () => <div className={styles.footer}>
{config.footerText}
</div>
export default Footer