app.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 './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. </div>
  30. ) : (<div className={`${config.tab || ''}`} id="page">
  31. <Header tabs={project.tabs} active={config.tab} {...this.props} />
  32. {children}
  33. <Login {...this.props} />
  34. <PayModal {...this.props} />
  35. </div>
  36. )}
  37. </LocaleProvider>
  38. );
  39. }
  40. }