|
|
@@ -1,7 +1,7 @@
|
|
|
import React, {Component} from 'react';
|
|
|
-import {Layout, Menu, Input, Modal, Button, Spin, Breadcrumb, Icon, Radio, LocaleProvider} from 'antd';
|
|
|
+import {Layout, Menu, Button, Spin, Icon, LocaleProvider} from 'antd';
|
|
|
import {BrowserRouter as Router, Route, Link, Switch, Redirect} from "react-router-dom";
|
|
|
-import {Mutation, Query} from "react-apollo";
|
|
|
+import {Query} from "react-apollo";
|
|
|
import gql from "graphql-tag";
|
|
|
|
|
|
import moment from 'moment';
|
|
|
@@ -12,8 +12,8 @@ import zhCN from 'antd/lib/locale-provider/zh_CN';
|
|
|
import WechatService from "../wechatService/WechatService";
|
|
|
import QuantService from "../quantService/QuantService";
|
|
|
import TrialCase from "../trialCase/TrialCase";
|
|
|
+import UserCreate from "../userCreate/UserCreate";
|
|
|
import Login from "../login/Login";
|
|
|
-import Table from '../common/schema/Table';
|
|
|
import '../common/graphql/index.css';
|
|
|
import './index.css'
|
|
|
import Create from "../common/schema/Create";
|
|
|
@@ -21,7 +21,6 @@ import Create from "../common/schema/Create";
|
|
|
import {SHOW_ALL_SCHEMA} from "../gql";
|
|
|
import axios from 'axios';
|
|
|
import {getCookie} from "../cookie";
|
|
|
-import Schema from "../common/schema/Schema";
|
|
|
|
|
|
axios.defaults.withCredentials = true;
|
|
|
|
|
|
@@ -302,7 +301,8 @@ class App extends Component {
|
|
|
key={locale ? locale.locale : 'en'/* Have to refresh for production environment */}>
|
|
|
<Switch>
|
|
|
<Route path="/" exact component={TrialCase}/>
|
|
|
- <Route path="/graphql-service/:sidebar/:case" component={TrialCase}/>
|
|
|
+ <Route path="/graphql-service/trial-case/:case" component={TrialCase}/>
|
|
|
+ <Route path="/graphql-service/my-create/:case" component={UserCreate}/>
|
|
|
<Route path="/wechat-service/:sidebar/:case" component={WechatService}/>
|
|
|
<Route path="/quant-service/" component={QuantService}/>
|
|
|
<Route path="/login" component={Login}/>
|
|
|
@@ -322,34 +322,11 @@ class GraphqlSidebar extends Component {
|
|
|
constructor(props) {
|
|
|
super(props);
|
|
|
this.state = {
|
|
|
- // getID_url: 'http://123.206.193.98:8999/getuserid',
|
|
|
userID: getCookie('user_id'),
|
|
|
show: false
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- // componentWillMount() {
|
|
|
- // let _this = this;
|
|
|
- // axios.get(this.state.getID_url)
|
|
|
- // .then((res) => {
|
|
|
- // if (res.data !== '') {
|
|
|
- // _this.setState({
|
|
|
- // userID: res.data,
|
|
|
- // show: true
|
|
|
- // })
|
|
|
- // } else {
|
|
|
- // _this.setState({
|
|
|
- // show: true
|
|
|
- // })
|
|
|
- // }
|
|
|
- // })
|
|
|
- // .catch((err) => {
|
|
|
- // console.log(err);
|
|
|
- // });
|
|
|
- // }
|
|
|
-
|
|
|
-
|
|
|
render() {
|
|
|
return (
|
|
|
<Query query={gql(SHOW_ALL_SCHEMA)} variables={{user_id: this.state.userID}}>
|