content.jsx 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import React from 'react';
  2. import '../../content.less';
  3. import LeftTab from '../leftTab.jsx';
  4. import Comprehensive from './comprehensive.jsx';
  5. import Payment from './payment.jsx';
  6. import Correction from './correction.jsx';
  7. import Express from './express.jsx';
  8. import ApplyFee from './applyFee.jsx';
  9. const Content = React.createClass({
  10. getInitialState() {
  11. return {
  12. loading: false,
  13. leftKey: 'express',
  14. };
  15. },
  16. handlekey(key) {
  17. this.setState({
  18. leftKey: key,
  19. });
  20. },
  21. render() {
  22. return (
  23. <div className="acc-content">
  24. <LeftTab handlekey={this.handlekey} />
  25. <div className="content-right">
  26. {(() => {
  27. switch (this.state.leftKey) {
  28. case 'comprehensive':
  29. return <Comprehensive />;
  30. case 'payment':
  31. return <Payment />;
  32. case 'correction':
  33. return <Correction />;
  34. case 'express':
  35. return <Express />;
  36. case 'applyFee':
  37. return <ApplyFee />;
  38. };
  39. })()}
  40. </div>
  41. </div>
  42. )
  43. }
  44. });
  45. export default Content;