Procházet zdrojové kódy

修改添加普通用户模块

Csy817 před 7 roky
rodič
revize
3a5d753694

+ 201 - 204
src/app/App.jsx

@@ -163,211 +163,208 @@ class App extends Component {
         const {locale, languageButton, visible, wxVisible} = this.state;
 
         return (
-            <Router>
-                <Layout style={{minHeight: '100vh'}}>
-                    <Header className="header" style={{position: 'fixed', zIndex: 1, width: '100%'}}>
-                        <Link to="/"
-                              onClick={() => this.setState({menuLevel1: "graphql-service", sideBar: "ecommerce"})}>
-                            <div className="logo-wrapper">
-                                <div className='logo'/>
-                            </div>
-                        </Link>
-                        <Menu
-                            theme="dark"
-                            mode="horizontal"
-                            selectedKeys={[this.state.menuLevel1]}
-                            style={{lineHeight: '64px'}}
-                            onClick={(e) => this.switchMenuTab('menuLevel1', e)}
-                        >
-                            <Menu.Item key="graphql-service">
-                                <Link to="/graphql-service/trial-case/index"><FormattedMessage
-                                    id="Graphql Service"/></Link>
-                            </Menu.Item>
-                            <Menu.Item key="wechat-service">
-                                <Link to="/wechat-service/trial-case/index"><FormattedMessage
-                                    id="Wechat Service"/></Link>
-                            </Menu.Item>
-                            <Menu.Item key="quant-service">
-                                <Link to="/quant-service/trial-case/index"><FormattedMessage id="Quantization Service"/></Link>
-                            </Menu.Item>
-                        </Menu>
-
-                        {
-                            this.state.userID === '' ?
-                                <Link to="/login">
-                                    <Button className='login-button' type='primary'
-                                            onClick={() => this.switchMenuLevel('menuLevel1', 'user')}>
-                                        <FormattedMessage id="Login"/></Button>
-                                </Link>
-                                :
-                                <User
-                                    userID={this.state.userID}
-                                    languageButton={this.state.languageButton}
-                                    changeLocale={this.changeLocale}
-                                    switchMenuLevel={this.switchMenuLevel}
-                                />
-                        }
+            <Layout style={{minHeight: '100vh'}}>
+                <Header className="header" style={{position: 'fixed', zIndex: 1, width: '100%'}}>
+                    <Link to="/"
+                          onClick={() => this.setState({menuLevel1: "graphql-service", sideBar: "ecommerce"})}>
+                        <div className="logo-wrapper">
+                            <div className='logo'/>
+                        </div>
+                    </Link>
+                    <Menu
+                        theme="dark"
+                        mode="horizontal"
+                        selectedKeys={[this.state.menuLevel1]}
+                        style={{lineHeight: '64px'}}
+                        onClick={(e) => this.switchMenuTab('menuLevel1', e)}
+                    >
+                        <Menu.Item key="graphql-service">
+                            <Link to="/developer/graphql-service/trial-case/index"><FormattedMessage
+                                id="Graphql Service"/></Link>
+                        </Menu.Item>
+                        <Menu.Item key="wechat-service">
+                            <Link to="/developer/wechat-service/trial-case/index"><FormattedMessage
+                                id="Wechat Service"/></Link>
+                        </Menu.Item>
+                        <Menu.Item key="quant-service">
+                            <Link to="/developer/quant-service/trial-case/index"><FormattedMessage id="Quantization Service"/></Link>
+                        </Menu.Item>
+                    </Menu>
+
+                    {
+                        this.state.userID === '' ?
+                            <Link to="/developer/login">
+                                <Button className='login-button' type='primary'
+                                        onClick={() => this.switchMenuLevel('menuLevel1', 'user')}>
+                                    <FormattedMessage id="Login"/></Button>
+                            </Link>
+                            :
+                            <User
+                                userID={this.state.userID}
+                                languageButton={this.state.languageButton}
+                                changeLocale={this.changeLocale}
+                                switchMenuLevel={this.switchMenuLevel}
+                            />
+                    }
 
-                    </Header>
+                </Header>
 
 
-                    {(() => {
-                        switch (this.state.menuLevel1) {
-                            case 'graphql-service':
-                                return (
-                                    <Sider
-                                        width={200}
-                                        style={{background: '#fff', marginTop: '64px', zIndex: '0'}}
-                                        collapsible
-                                        collapsed={this.state.collapsed}
-                                        onCollapse={this.onCollapse}
-                                    >
-                                        <GraphqlSidebar inlineCollapsed={this.state.inlineCollapsed}
-                                                        sideBar={this.state.sideBar} switchMenu={this.switchMenu}
-                                                        showModal={this.showModal}/>
-
-                                    </Sider>
-                                );
-                            case 'wechat-service':
-                                return (
-                                    <Sider
-                                        width={200}
-                                        style={{background: '#fff', marginTop: '64px', zIndex: '0'}}
-                                        collapsible
-                                        collapsed={this.state.collapsed}
-                                        onCollapse={this.onCollapse}
-                                    >
-                                        <WxConfigSiderbar inlineCollapsed={this.state.inlineCollapsed}
-                                                          sideBar={this.state.sideBar} switchMenu={this.switchMenu}
-                                                          wxShowModal={this.wxShowModal}/>
-                                    </Sider>
-                                );
-                            case 'quant-service':
-                                return (
-                                    <Sider
-                                        width={200}
-                                        style={{background: '#fff', marginTop: '64px', zIndex: '0'}}
-                                        collapsible
-                                        collapsed={this.state.collapsed}
-                                        onCollapse={this.onCollapse}
+                {(() => {
+                    switch (this.state.menuLevel1) {
+                        case 'graphql-service':
+                            return (
+                                <Sider
+                                    width={200}
+                                    style={{background: '#fff', marginTop: '64px', zIndex: '0'}}
+                                    collapsible
+                                    collapsed={this.state.collapsed}
+                                    onCollapse={this.onCollapse}
+                                >
+                                    <GraphqlSidebar inlineCollapsed={this.state.inlineCollapsed}
+                                                    sideBar={this.state.sideBar} switchMenu={this.switchMenu}
+                                                    showModal={this.showModal}/>
+
+                                </Sider>
+                            );
+                        case 'wechat-service':
+                            return (
+                                <Sider
+                                    width={200}
+                                    style={{background: '#fff', marginTop: '64px', zIndex: '0'}}
+                                    collapsible
+                                    collapsed={this.state.collapsed}
+                                    onCollapse={this.onCollapse}
+                                >
+                                    <WxConfigSiderbar inlineCollapsed={this.state.inlineCollapsed}
+                                                      sideBar={this.state.sideBar} switchMenu={this.switchMenu}
+                                                      wxShowModal={this.wxShowModal}/>
+                                </Sider>
+                            );
+                        case 'quant-service':
+                            return (
+                                <Sider
+                                    width={200}
+                                    style={{background: '#fff', marginTop: '64px', zIndex: '0'}}
+                                    collapsible
+                                    collapsed={this.state.collapsed}
+                                    onCollapse={this.onCollapse}
+                                >
+                                    <Menu
+                                        theme="dark"
+                                        mode="inline"
+                                        inlineCollapsed={this.state.inlineCollapsed}
+                                        defaultSelectedKeys={['quant-service']}
+                                        defaultOpenKeys={['trial-case']}
+                                        // openKeys={['cloud-function']}
+                                        onClick={(e) => this.switchMenu('sideBar', e)}
+                                        selectedKeys={['quant-service']}
+                                        style={{
+                                            borderRight: 0,
+                                            overflow: 'auto',
+                                            height: '100vh',
+                                            left: '0',
+                                            width: '200px',
+                                            position: 'fixed'
+                                        }}
                                     >
-                                        <Menu
-                                            theme="dark"
-                                            mode="inline"
-                                            inlineCollapsed={this.state.inlineCollapsed}
-                                            defaultSelectedKeys={['quant-service']}
-                                            defaultOpenKeys={['trial-case']}
-                                            // openKeys={['cloud-function']}
-                                            onClick={(e) => this.switchMenu('sideBar', e)}
-                                            selectedKeys={['quant-service']}
-                                            style={{
-                                                borderRight: 0,
-                                                overflow: 'auto',
-                                                height: '100vh',
-                                                left: '0',
-                                                width: '200px',
-                                                position: 'fixed'
-                                            }}
-                                        >
-                                            <SubMenu key="trial-case"
-                                                     title={<span><Icon type="appstore" theme="twoTone"/>
+                                        <SubMenu key="trial-case"
+                                                 title={<span><Icon type="appstore" theme="twoTone"/>
                                                          <span><FormattedMessage id="Case Show"/></span></span>}>
-                                                <Menu.Item key="quant-service">
-                                                    <Link to="/quant-service/trial-case/quant case">quant case</Link>
-                                                </Menu.Item>
-                                            </SubMenu>
-
-                                            <Menu.Item key="instructions">
-                                                <a href="https://ioobot-document.netlify.com/" title="instructions"
-                                                   target="instructions">
-                                                    <Icon type="file-text" theme="twoTone"/>
-                                                    <span><FormattedMessage id="Instructions"/></span>
-                                                </a>
-                                            </Menu.Item>
-                                        </Menu>
-                                    </Sider>
-                                );
-                            case 'user':
-                                return (
-                                    <Sider
-                                        width={200}
-                                        style={{background: '#fff', marginTop: '64px', zIndex: '0'}}
-                                        collapsible
-                                        collapsed={this.state.collapsed}
-                                        onCollapse={this.onCollapse}
-                                    >
-                                        <Menu
-                                            theme="dark"
-                                            defaultSelectedKeys={['cloud-settings']}
-                                            onClick={(e) => this.switchMenu('sideBar', e)}
-                                            selectedKeys={[this.state.sideBar]}
-                                            style={{
-                                                borderRight: 0,
-                                                overflow: 'auto',
-                                                height: '100vh',
-                                                left: '0',
-                                                width: '200px',
-                                                position: 'fixed'
-                                            }}
-                                        >
-                                            <Menu.Item key="account">
-                                                <Icon type="setting" theme="twoTone"/>
-                                                <span><FormattedMessage id="Account center"/></span>
-                                                <Link to="/login/account"/>
+                                            <Menu.Item key="quant-service">
+                                                <Link to="/developer/quant-service/trial-case/quant case">quant case</Link>
                                             </Menu.Item>
-
-                                            <Menu.Item key="cloud-settings">
-                                                <Icon type="cloud" theme="twoTone"/>
-                                                <span><FormattedMessage id="Cloud settings"/></span>
-                                                <Link to="/login/cloud"/>
-                                            </Menu.Item>
-                                        </Menu>
-                                    </Sider>
-                                );
-                            case 'ticket':
-                                return (
-                                    ''
-                                );
-                            default:
-                                return (
-                                    <Sider
-                                        width={200}
-                                        style={{background: '#fff', marginTop: '64px', zIndex: '0'}}
-                                        collapsible
-                                        collapsed={this.state.collapsed}
-                                        onCollapse={this.onCollapse}
+                                        </SubMenu>
+
+                                        <Menu.Item key="instructions">
+                                            <a href="https://ioobot-document.netlify.com/" title="instructions"
+                                               target="instructions">
+                                                <Icon type="file-text" theme="twoTone"/>
+                                                <span><FormattedMessage id="Instructions"/></span>
+                                            </a>
+                                        </Menu.Item>
+                                    </Menu>
+                                </Sider>
+                            );
+                        case 'user':
+                            return (
+                                <Sider
+                                    width={200}
+                                    style={{background: '#fff', marginTop: '64px', zIndex: '0'}}
+                                    collapsible
+                                    collapsed={this.state.collapsed}
+                                    onCollapse={this.onCollapse}
+                                >
+                                    <Menu
+                                        theme="dark"
+                                        defaultSelectedKeys={['cloud-settings']}
+                                        onClick={(e) => this.switchMenu('sideBar', e)}
+                                        selectedKeys={[this.state.sideBar]}
+                                        style={{
+                                            borderRight: 0,
+                                            overflow: 'auto',
+                                            height: '100vh',
+                                            left: '0',
+                                            width: '200px',
+                                            position: 'fixed'
+                                        }}
                                     >
-                                        <GraphqlSidebar inlineCollapsed={this.state.inlineCollapsed}
-                                                        sideBar={this.state.sideBar} switchMenu={this.switchMenu}
-                                                        showModal={this.showModal}/>
-                                    </Sider>
-                                );
-                        }
-                    })()}
-                    <Create visible={visible} hideModal={this.hideModal} switchSidebar={this.switchSidebar}/>
-                    <WxCreate visible={wxVisible} hideModal={this.wxHideModal} switchSidebar={this.switchSidebar}/>
-
-                    <LocaleProvider locale={locale}>
-                        <Layout style={{marginTop: '64px', zIndex: '0'}}
-                                key={locale ? locale.locale : 'en'/* Have to refresh for production environment */}>
-                            <Switch>
-                                <Route path="/" exact component={TrialCase}/>
-                                <Route path="/graphql-service/trial-case/:case" component={TrialCase}/>
-                                <Route path="/graphql-service/my-create/:case" component={UserCreate}/>
-                                <Route path="/wechat-service/trial-case/:case" component={WxTrialCase}/>
-                                <Route path="/wechat-service/my-create/:case" component={WxUserCreate}/>
-                                <Route path="/quant-service/:sidebar/:case" component={QuantService}/>
-                                <Route path="/quant-service/:sidebar/:case" component={QuantService}/>
-                                <Route path="/login/:setting" component={Login}/>
-                                <Route path="/login" component={Login}/>
-                                <Route path="/ticket" component={Ticket}/>
-                                <Route path="/graphiql" component={Graphiql}/>
-                                <Redirect path="*" to="/"/>
-                            </Switch>
-                        </Layout>
-                    </LocaleProvider>
-                </Layout>
-            </Router>
+                                        <Menu.Item key="account">
+                                            <Icon type="setting" theme="twoTone"/>
+                                            <span><FormattedMessage id="Account center"/></span>
+                                            <Link to="/developer/login/account"/>
+                                        </Menu.Item>
+
+                                        <Menu.Item key="cloud-settings">
+                                            <Icon type="cloud" theme="twoTone"/>
+                                            <span><FormattedMessage id="Cloud settings"/></span>
+                                            <Link to="/developer/login/cloud"/>
+                                        </Menu.Item>
+                                    </Menu>
+                                </Sider>
+                            );
+                        case 'ticket':
+                            return (
+                                ''
+                            );
+                        default:
+                            return (
+                                <Sider
+                                    width={200}
+                                    style={{background: '#fff', marginTop: '64px', zIndex: '0'}}
+                                    collapsible
+                                    collapsed={this.state.collapsed}
+                                    onCollapse={this.onCollapse}
+                                >
+                                    <GraphqlSidebar inlineCollapsed={this.state.inlineCollapsed}
+                                                    sideBar={this.state.sideBar} switchMenu={this.switchMenu}
+                                                    showModal={this.showModal}/>
+                                </Sider>
+                            );
+                    }
+                })()}
+                <Create visible={visible} hideModal={this.hideModal} switchSidebar={this.switchSidebar}/>
+                <WxCreate visible={wxVisible} hideModal={this.wxHideModal} switchSidebar={this.switchSidebar}/>
+
+                <LocaleProvider locale={locale}>
+                    <Layout style={{marginTop: '64px', zIndex: '0'}}
+                            key={locale ? locale.locale : 'en'/* Have to refresh for production environment */}>
+                        <Switch>
+                            <Route path="/developer" exact component={TrialCase}/>
+                            <Route path="/developer/graphql-service/trial-case/:case" component={TrialCase}/>
+                            <Route path="/developer/graphql-service/my-create/:case" component={UserCreate}/>
+                            <Route path="/developer/wechat-service/trial-case/:case" component={WxTrialCase}/>
+                            <Route path="/developer/wechat-service/my-create/:case" component={WxUserCreate}/>
+                            <Route path="/developer/quant-service/:sidebar/:case" component={QuantService}/>
+                            <Route path="/developer/login/:setting" component={Login}/>
+                            <Route path="/developer/login" component={Login}/>
+                            <Route path="/developer/ticket" component={Ticket}/>
+                            <Route path="/developer/graphiql" component={Graphiql}/>
+                            <Redirect path="*" to="/"/>
+                        </Switch>
+                    </Layout>
+                </LocaleProvider>
+            </Layout>
         );
     }
 }
@@ -432,7 +429,7 @@ class GraphqlSidebar extends Component {
                                         data.caseProject.map((project) =>
                                             <Menu.Item key={project.projectName}>
                                                 <Link to={{
-                                                    pathname: `/graphql-service/trial-case/${project.projectName}`,
+                                                    pathname: `/developer/graphql-service/trial-case/${project.projectName}`,
                                                     state: {
                                                         schemaName: project.projectName,
                                                         schemaID: project.schema_id.id,
@@ -462,7 +459,7 @@ class GraphqlSidebar extends Component {
                                         data.project.map((project) =>
                                             <Menu.Item key={project.projectName}>
                                                 <Link to={{
-                                                    pathname: `/graphql-service/my-create/${project.projectName}`,
+                                                    pathname: `/developer/graphql-service/my-create/${project.projectName}`,
                                                     state: {
                                                         schemaName: project.projectName,
                                                         schemaID: project.schema_id.id,
@@ -537,7 +534,7 @@ class WxConfigSiderbar extends Component {
                                                 return (
                                                     <Menu.Item key={appName}>
                                                         <Link to={{
-                                                            pathname: `/wechat-service/trial-case/${appName}`,
+                                                            pathname: `/developer/wechat-service/trial-case/${appName}`,
                                                             state: {
                                                                 appName,
                                                                 configID,
@@ -575,7 +572,7 @@ class WxConfigSiderbar extends Component {
                                                 return (
                                                     <Menu.Item key={appName}>
                                                         <Link to={{
-                                                            pathname: `/wechat-service/my-create/${appName}`,
+                                                            pathname: `/developer/wechat-service/my-create/${appName}`,
                                                             state: {
                                                                 appName,
                                                                 configID,
@@ -653,14 +650,14 @@ class User extends Component {
                                         }}>{this.props.languageButton}</a>
                                     </Menu.Item>
                                     <Menu.Item>
-                                        <Link to="/login">
+                                        <Link to="/developer/login">
                                             <div onClick={() => this.props.switchMenuLevel('menuLevel1', 'user')}>
                                                 <FormattedMessage id="Account center"/>
                                             </div>
                                         </Link>
                                     </Menu.Item>
                                     <Menu.Item>
-                                        <Link to="/ticket">
+                                        <Link to="/developer/ticket">
                                             <div onClick={() => this.props.switchMenuLevel('menuLevel1', 'ticket')}>
                                                 <FormattedMessage id="Submit Support Ticket"/>
                                             </div>

+ 53 - 0
src/app/Home.jsx

@@ -0,0 +1,53 @@
+import React, {Component} from 'react';
+import {FormattedMessage} from 'react-intl';
+import {Layout,Button} from 'antd';
+import {withRouter} from "react-router-dom";
+
+import './index.css';
+const {Header, Footer, Content} = Layout;
+
+class Home extends Component {
+    constructor(props) {
+        super(props);
+        this.state = {
+
+        }
+    }
+
+    render() {
+        return (
+            <div>
+                <Layout className="layout">
+                    <Header>
+                        <div className="logo-wrapper">
+                            <div className='logo'/>
+                        </div>
+                    </Header>
+                    <Content style={{ padding: '30px 50px 0', minHeight: '780px' }}>
+                        <div className="home-btn">
+                            <Button type="primary" size='large'
+                                    style={{marginRight:'10px'}}
+                                    onClick={()=>{
+                                        this.props.history.push({
+                                            pathname: `/common`
+                                        })}}>用户版
+                            </Button>
+                            <Button size='large'
+                                    style={{marginLeft:'10px'}}
+                                    onClick={()=>{
+                                        this.props.history.push({
+                                            pathname: `/developer`
+                                        })}}>开发者版
+                            </Button>
+                        </div>
+                    </Content>
+                    <Footer style={{ textAlign: 'center' }}>
+                        All right ©2019 Created by Ioobot
+                    </Footer>
+                </Layout>
+            </div>
+        )
+    }
+}
+
+export default withRouter(Home);

+ 60 - 0
src/app/basicVersion/BasicVersion.jsx

@@ -0,0 +1,60 @@
+import React, {Component} from 'react';
+import {FormattedMessage} from 'react-intl';
+import {Route, Link, Switch, Redirect} from "react-router-dom";
+import {Layout, Menu, Button, Spin, Icon, LocaleProvider, Dropdown, Avatar, Badge} from 'antd';
+
+import '../index.css';
+import ExampleShow from "./exampleShow/ExampleShow";
+import MyDeploy from "./myDeploy/MyDeploy";
+import Communication from "./communication/Communication";
+const {Header, Content} = Layout;
+
+class BasicVersion extends Component {
+    constructor(props) {
+        super(props);
+        this.state = {
+
+        }
+    }
+
+    render() {
+        return (
+            <Layout style={{minHeight: '100vh'}}>
+                <Header className="header" style={{position: 'fixed', zIndex: 1, width: '100%'}}>
+                    <Link to="/">
+                        <div className="logo-wrapper">
+                            <div className='logo'/>
+                        </div>
+                    </Link>
+                    <Menu
+                        theme="dark"
+                        mode="horizontal"
+                        style={{lineHeight: '64px'}}
+                    >
+                        <Menu.Item key="example">
+                            <Link to="/common/example"><FormattedMessage id="Example"/></Link>
+                        </Menu.Item>
+                        <Menu.Item key="my-deploy">
+                            <Link to="/common/deploy"><FormattedMessage id="My deploy"/></Link>
+                        </Menu.Item>
+                        <Menu.Item key="communication">
+                            <Link to="/common/communication"><FormattedMessage id="Communication"/></Link>
+                        </Menu.Item>
+                    </Menu>
+                </Header>
+
+                <Layout style={{marginTop: '64px', zIndex: '0'}}>
+                    <Switch>
+                        <Route path="/common" exact component={ExampleShow}/>
+                        <Route path="/common/example" exact component={ExampleShow}/>
+                        <Route path="/common/deploy" component={MyDeploy}/>
+                        <Route path="/common/communication" component={Communication}/>
+                    </Switch>
+                </Layout>
+
+            </Layout>
+        )
+    }
+}
+
+export default BasicVersion;

+ 28 - 0
src/app/basicVersion/communication/Communication.jsx

@@ -0,0 +1,28 @@
+import React, {Component} from 'react';
+
+import {Layout} from 'antd';
+
+const {Content} = Layout;
+
+class Communication extends Component{
+    constructor(){
+        super();
+        this.state={
+
+        }
+    }
+
+    render(){
+        return(
+            <div>
+                <Layout style={{ padding: '24px',minHeight:'300px' }}>
+                    <Content style={{ padding: '20px 50px', background: '#fff' }}>
+                        Communication
+                    </Content>
+                </Layout>
+            </div>
+        )
+    }
+}
+
+export default Communication;

+ 62 - 0
src/app/basicVersion/exampleShow/ExampleShow.jsx

@@ -0,0 +1,62 @@
+import React,{Component} from 'react';
+import {Layout, Card, Icon,Button, Avatar } from 'antd';
+
+import './index.css'
+const {Content} = Layout;
+const { Meta } = Card;
+
+class ExampleShow extends Component {
+    constructor(props) {
+        super(props);
+        this.state = {
+
+        }
+    }
+
+    renderCard = () =>{
+        let example =[
+            {title:1,description:'1'},
+            {title:2,description:'1'},
+            {title:3,description:'1'},
+            {title:4,description:'1'},
+            {title:5,description:'1'},
+            {title:6,description:'1'},
+            ];
+
+        return example.map((item,index)=>{
+            return(
+                <span key= {index} style={{padding:'10px 0'}}>
+                    <Card
+                        key= {index}
+                        style={{ width: 300 }}
+                        cover={<img alt="example" src="https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png" />}
+                        actions={[<Icon type="setting" />, <Icon type="edit" />,
+                            <Button type="primary">部署</Button>
+                        ]}
+                    >
+                        <Meta
+                            avatar={<Avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />}
+                            title={item.title}
+                            description={item.description}
+                        />
+                    </Card>
+                </span>
+            )
+        })
+
+    };
+
+    render(){
+        return (
+            <div id="example-show">
+                <Layout style={{ padding: '24px',minHeight:'300px' }}>
+                    <Content className="content">
+                        {this.renderCard()}
+                    </Content>
+                </Layout>
+            </div>
+        )
+    }
+}
+
+export default ExampleShow;

+ 7 - 0
src/app/basicVersion/exampleShow/index.css

@@ -0,0 +1,7 @@
+#example-show .content{
+    padding: 20px 50px;
+    background: rgb(255, 255, 255);
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: space-between;
+}

+ 0 - 0
src/app/basicVersion/index.css


+ 28 - 0
src/app/basicVersion/myDeploy/MyDeploy.jsx

@@ -0,0 +1,28 @@
+import React, {Component} from 'react';
+
+import {Layout} from 'antd';
+
+const {Content} = Layout;
+
+class MyDeploy extends Component{
+    constructor(){
+        super();
+        this.state={
+
+        }
+    }
+
+    render(){
+        return(
+            <div>
+                <Layout style={{ padding: '24px',minHeight:'300px' }}>
+                    <Content style={{ padding: '20px 50px', background: '#fff' }}>
+                        MyDeploy
+                    </Content>
+                </Layout>
+            </div>
+        )
+    }
+}
+
+export default MyDeploy;

+ 9 - 0
src/app/index.css

@@ -81,3 +81,12 @@
 .login-out {
     margin-top: 20px;
 }
+
+.home-btn {
+    background: #fff;
+    padding: 24px;
+    min-height: 780px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+}

+ 12 - 2
src/index.js

@@ -1,8 +1,10 @@
 import React, {Component} from 'react';
 import ReactDOM from 'react-dom';
 import './index.css';
-import App from './app/App'
+import App from './app/App';
+import Home from './app/Home';
 import * as serviceWorker from './serviceWorker';
+import {BrowserRouter as Router, Route, Link, Switch, Redirect} from "react-router-dom";
 
 import ApolloClient from "apollo-boost";
 import {ApolloProvider} from "react-apollo";
@@ -15,6 +17,7 @@ import en from 'react-intl/locale-data/en';
 import zh_CN from './language/zh_CN.js';
 import en_US from './language/en_US.js';
 import {graphqlUrl} from "./config";
+import BasicVersion from "./app/basicVersion/BasicVersion";
 
 addLocaleData([...en, ...zh]);
 
@@ -69,7 +72,14 @@ class MainApp extends Component {
         return (
             <ApolloProvider client={client}>
                 <IntlProvider locale={locale} messages={messages}>
-                    <App language={language} changeLanguage={this.changeLanguage}/>
+                    <Router>
+                        <Switch>
+                            <Route exact path="/" component={Home} />
+                            <Route path="/developer" component={App} />
+                            {/*<Route path="/developer" component={<App language={language} changeLanguage={this.changeLanguage}/>} />*/}
+                            <Route path="/common" component={BasicVersion} />
+                        </Switch>
+                    </Router>
                 </IntlProvider>
             </ApolloProvider>
         )