app.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import React, { Component } from 'react';
  2. import { LocaleProvider } from 'antd';
  3. import zhCN from 'antd/lib/locale-provider/zh_CN';
  4. import './app.less';
  5. import Header from './components/Header';
  6. import Login from './components/Login';
  7. import { InviteModal } from './components/OtherModal';
  8. import './components/Other';
  9. import './components/VipRenew';
  10. import './components/UserAction';
  11. import './components/UserTable';
  12. import './components/UserPagination';
  13. import { PayModal } from './components/PayModal';
  14. export default class extends Component {
  15. constructor(props) {
  16. super(props);
  17. const state = { routes: [] };
  18. this.state = state;
  19. }
  20. render() {
  21. const { children, project, config } = this.props;
  22. return (
  23. <LocaleProvider locale={zhCN}>
  24. {config.hideHeader ? (
  25. <div id="full-page">
  26. {children}
  27. <Login {...this.props} />
  28. <PayModal {...this.props} />
  29. <InviteModal {...this.props} />
  30. </div>
  31. ) : (<div className={`${config.tab || ''}`} id="page">
  32. <Header tabs={project.tabs} active={config.tab} {...this.props} />
  33. {children}
  34. <Login {...this.props} />
  35. <PayModal {...this.props} />
  36. <InviteModal {...this.props} />
  37. </div>)}
  38. </LocaleProvider>
  39. );
  40. }
  41. }