瀏覽代碼

去除 demo

kulley 7 年之前
父節點
當前提交
46d367a698
共有 2 個文件被更改,包括 5 次插入6 次删除
  1. 2 2
      src/app/basicVersion/myDeploy/MyDeploy.jsx
  2. 3 4
      src/app/basicVersion/myDeploy/TencentDeploy.js

+ 2 - 2
src/app/basicVersion/myDeploy/MyDeploy.jsx

@@ -28,7 +28,7 @@ class MyDeploy extends Component {
         super(props);
         this.state = {
             cloud: 'tencent',
-            userID: 'demo',
+            userID: '',
             url: ''
         };
     }
@@ -62,7 +62,7 @@ class MyDeploy extends Component {
                     <Content style={{ background: '#fff' }}>
                         {
                             // 登录用户与非登录用户区别对待
-                            this.state.userID === 'demo'?
+                            this.state.userID === ''?
                                 <TencentDeploy userID={userID} url={url}/>
                                 :
                                 <Card

+ 3 - 4
src/app/basicVersion/myDeploy/TencentDeploy.js

@@ -25,7 +25,7 @@ class TencentDeploy extends Component {
     componentWillMount() {
         this._isMounted = true;
         let {userID} = this.state;
-        if (userID !== 'demo') {
+        if (userID !== '') {
             request(graphqlUrl, SHOW_APIGROUP, {user_id: userID}).then(res => {
                 let allDeployed = res.apiGWGroupbyprops;
                 let deployed = allDeployed.filter(deployed =>
@@ -115,10 +115,9 @@ class TencentDeploy extends Component {
                                                         <span className={'schema-table-content'}>{deploy.groupName.replace(regexp, '')}</span>
                                                     </Col>
                                                     <Col span={15}>
-                                                        <span
-                                                            className={'schema-table-content'}>{`http://${deploy.defaultDomain}/test/graphql`} </span>
+                                                        <span className={'schema-table-content'}>{`http://${deploy.defaultDomain}/test`} </span>
                                                         <Icon type="copy" theme="twoTone" onClick={() => {
-                                                            copy(url);
+                                                            copy(`http://${deploy.defaultDomain}/test`);
                                                             message.success('复制成功.');
                                                         }}/>
                                                     </Col>