import React, { Component } from 'react';
import { connect } from 'dva';
import { Route, routerRedux, Switch, Redirect } from 'dva/router';
import { Menu } from 'antd';
import styles from './Info.less';
import { getRoutes } from '../../utils/utils';
const { Item } = Menu;
const menuMap = {
base: '基本设置',
safe: '安全设置',
account: '账号绑定',
message: '新消息通知',
};
@connect(({ user }) => ({
currentUser: user.currentUser,
}))
export default class Info extends Component {
constructor(props) {
super(props);
const { match, location } = props;
let key = location.pathname.replace(`${match.path}/`, '');
key = menuMap[key] ? key : 'base';
this.state = {
selectKey: key,
};
}
getmenu = () => {
return Object.keys(menuMap).map(item => (