import React from 'react'; import '../content.less'; import LeftTab from './leftTab.jsx'; import GroupLeftTab from './leftTabgroup.jsx'; import Base from './base.jsx'; import Group from './group.jsx'; import Person from './person.jsx'; import Company from './company.jsx'; import Edu from './edu.jsx'; import Tech from './tech.jsx'; import Pfs from './pfs.jsx'; import Ablt from './ablt.jsx'; import HrSituation from './hrSituation.jsx'; const Content = React.createClass({ getInitialState() { return { loading: false, leftKey: 'standard', userType: '0' }; }, handlekey(key) { this.setState({ leftKey: key, }); window.location.hash = key; }, componentWillMount() { if (userData) { if (userData.type == '0') { this.state.leftKey = 'base'; } else if (userData.type == '1') { this.state.leftKey = 'group'; }; }; if (window.location.hash) { this.handlekey(window.location.hash.substr(1)); }; }, render() { return (
{(() => { if (userData.type == 1) { return ; } else { return ; }; })()}
{(() => { switch (this.state.leftKey) { case 'base': return ; case 'person': return ; case 'edu': return ; case 'pfs': return ; case 'ablt': return ; case 'group': return ; case 'company': return ; case 'tech': return ; case 'hrSituation': return ; }; })()}
) } }); export default Content;