| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- import React, {Component} from 'react';
- import {Layout, Menu} from 'antd';
- import WxConfig from "../wxConfig/WxConfig";
- import WxDeploy from "../wxDeploy/WxDeploy";
- import WxResult from '../wxResult/WxResult';
- import Schema from "../../graphqlService/common/schema/Schema";
- const {Content} = Layout;
- class WXUserCreate extends Component {
- constructor() {
- super();
- this.state = {
- menuLevel3: "wechat-config",
- }
- }
- switchMenu = (menuName, e) => {
- this.setState({
- [menuName]: e.key,
- });
- };
- render() {
- return (
- <div>
- <Menu
- mode="horizontal"
- defaultSelectedKeys={['wechat-config']}
- style={{
- padding: '0 24px',
- position: 'fixed',
- width: '100%',
- zIndex: '1',
- lineHeight: '50px',
- fontWeight: 600
- }}
- onClick={(e) => this.switchMenu('menuLevel3', e)}
- selectedKeys={[this.state.menuLevel3]}
- >
- <Menu.Item key="wechat-config">config settings</Menu.Item>
- <Menu.Item key="wechat-deploy">deploy settings</Menu.Item>
- <Menu.Item key="wechat-result">result</Menu.Item>
- </Menu>
- <Layout style={{padding: '24px', zIndex: '0'}}>
- <Content style={{padding: '24px', minHeight: 280, background: '#fff', marginTop: '48px'}}>
- {(() => {
- switch (this.state.menuLevel3) {
- case 'wechat-config':
- return <WxConfig history={this.props.history} location={this.props.location}/>;
- case 'wechat-deploy':
- return <WxDeploy/>;
- case 'wechat-result':
- return <WxResult/>;
- default:
- return <WxConfig/>
- }
- })()}
- </Content>
- </Layout>
- </div>
- )
- }
- }
- export default WXUserCreate;
|