kulley 7 éve
szülő
commit
6783fc9ec5

+ 88 - 16
src/all_graphql.txt

@@ -8,6 +8,7 @@ query userbyid($id: ID) {
     username
     createdAt
     openid
+    language
     id
     avatar
   }
@@ -33,6 +34,7 @@ query ticketbyid($id: ID) {
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -52,6 +54,7 @@ query notificationbyprops($user_id: ID, $type: String, $webhook: String, $name:
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -103,6 +106,7 @@ query deploybyprops($description: String, $updatedAt: String, $cosBucketName: St
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -155,6 +159,7 @@ query deploybyid($id: ID) {
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -177,6 +182,7 @@ query databasebyid($id: ID) {
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -202,6 +208,7 @@ query notificationbyid($id: ID) {
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -244,6 +251,7 @@ query apiGWGroupbyid($id: ID) {
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -262,6 +270,7 @@ query fcbyprops($user_id: ID, $cloud_id: ID, $fcType: String, $schema_id: ID, $w
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -347,6 +356,7 @@ query apiGWGroupbyprops($environmentName: String, $userStatus: String, $defaultD
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -405,6 +415,7 @@ query apiGWPathbyprops($apiGWName: String, $updatedAt: String, $apiGWGroup_id: I
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -437,6 +448,7 @@ query schemabyprops($updatedAt: String, $schemaState: String, $authWrite: String
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -466,6 +478,7 @@ query schemabyid($id: ID) {
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -496,6 +509,7 @@ query wxConfigbyid($id: ID) {
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -542,8 +556,10 @@ query projectbyid($id: ID) {
       title
       deployedNum
       id
+      detailDescription
 
 
+      detailImages
       img
     }
     createdAt
@@ -597,6 +613,7 @@ query projectbyid($id: ID) {
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -645,6 +662,7 @@ query casebyid($id: ID) {
     title
     deployedNum
     id
+    detailDescription
     user_id {
       email
       updatedAt
@@ -654,6 +672,7 @@ query casebyid($id: ID) {
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -672,6 +691,7 @@ query casebyid($id: ID) {
 
       authWriteObjects
     }
+    detailImages
     img
   }
 }
@@ -688,6 +708,7 @@ query cloudbyid($id: ID) {
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -737,8 +758,10 @@ query projectbyprops($updatedAt: String, $database_id: ID, $apiGWGroup_id: ID, $
       title
       deployedNum
       id
+      detailDescription
 
 
+      detailImages
       img
     }
     createdAt
@@ -792,6 +815,7 @@ query projectbyprops($updatedAt: String, $database_id: ID, $apiGWGroup_id: ID, $
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -854,6 +878,7 @@ query wxConfigbyprops($updatedAt: String, $mch_id: String, $appName: String, $no
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -915,6 +940,7 @@ query apiGWPathbyid($id: ID) {
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -937,6 +963,7 @@ query orderbyid($id: ID) {
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -957,6 +984,7 @@ query cloudbyprops($user_id: ID, $cloudName: String, $secretId: String, $secretK
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -969,8 +997,8 @@ query cloudbyprops($user_id: ID, $cloudName: String, $secretId: String, $secretK
   }
 }
 
-query casebyprops($description: String, $updatedAt: String, $createdAt: String, $type: String, $title: String, $deployedNum: Int, $user_id: ID, $schema_id: ID, $img: String) {
-  casebyprops: case_by_props(description: $description updatedAt: $updatedAt createdAt: $createdAt type: $type title: $title deployedNum: $deployedNum user_id: $user_id schema_id: $schema_id img: $img) {
+query casebyprops($description: String, $updatedAt: String, $createdAt: String, $type: String, $title: String, $deployedNum: Int, $detailDescription: String, $user_id: ID, $schema_id: ID, $img: String) {
+  casebyprops: case_by_props(description: $description updatedAt: $updatedAt createdAt: $createdAt type: $type title: $title deployedNum: $deployedNum detailDescription: $detailDescription user_id: $user_id schema_id: $schema_id img: $img) {
     description
     updatedAt
     createdAt
@@ -978,6 +1006,7 @@ query casebyprops($description: String, $updatedAt: String, $createdAt: String,
     title
     deployedNum
     id
+    detailDescription
     user_id {
       email
       updatedAt
@@ -987,6 +1016,7 @@ query casebyprops($description: String, $updatedAt: String, $createdAt: String,
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -1005,6 +1035,7 @@ query casebyprops($description: String, $updatedAt: String, $createdAt: String,
 
       authWriteObjects
     }
+    detailImages
     img
   }
 }
@@ -1029,6 +1060,7 @@ query ticketbyprops($updatedAt: String, $repliedBy: ID, $content: String, $repli
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -1036,8 +1068,8 @@ query ticketbyprops($updatedAt: String, $repliedBy: ID, $content: String, $repli
   }
 }
 
-query userbyprops($email: String, $updatedAt: String, $password: String, $telephone: String, $nickname: String, $username: String, $createdAt: String, $openid: String, $avatar: String) {
-  userbyprops: user_by_props(email: $email updatedAt: $updatedAt password: $password telephone: $telephone nickname: $nickname username: $username createdAt: $createdAt openid: $openid avatar: $avatar) {
+query userbyprops($email: String, $updatedAt: String, $password: String, $telephone: String, $nickname: String, $username: String, $createdAt: String, $openid: String, $language: String, $avatar: String) {
+  userbyprops: user_by_props(email: $email updatedAt: $updatedAt password: $password telephone: $telephone nickname: $nickname username: $username createdAt: $createdAt openid: $openid language: $language avatar: $avatar) {
     email
     updatedAt
     password
@@ -1046,6 +1078,7 @@ query userbyprops($email: String, $updatedAt: String, $password: String, $teleph
     username
     createdAt
     openid
+    language
     id
     avatar
   }
@@ -1063,6 +1096,7 @@ query orderbyprops($user_id: ID, $createdAt: String, $updatedAt: String) {
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -1083,6 +1117,7 @@ query fcbyid($id: ID) {
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -1147,6 +1182,7 @@ query databasebyprops($user_id: ID, $dbName: String, $dbUsername: String, $dbPas
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -1160,8 +1196,8 @@ query databasebyprops($user_id: ID, $dbName: String, $dbUsername: String, $dbPas
   }
 }
 
-mutation createuser($email: String, $updatedAt: String, $password: String, $telephone: String, $nickname: String, $username: String, $createdAt: String, $openid: String, $id: ID!, $avatar: String) {
-  createuser: create_user(email: $email updatedAt: $updatedAt password: $password telephone: $telephone nickname: $nickname username: $username createdAt: $createdAt openid: $openid id: $id avatar: $avatar) {
+mutation createuser($email: String, $updatedAt: String, $password: String, $telephone: String, $nickname: String, $username: String, $createdAt: String, $openid: String, $language: String, $id: ID!, $avatar: String) {
+  createuser: create_user(email: $email updatedAt: $updatedAt password: $password telephone: $telephone nickname: $nickname username: $username createdAt: $createdAt openid: $openid language: $language id: $id avatar: $avatar) {
     email
     updatedAt
     password
@@ -1170,6 +1206,7 @@ mutation createuser($email: String, $updatedAt: String, $password: String, $tele
     username
     createdAt
     openid
+    language
     id
     avatar
   }
@@ -1187,6 +1224,7 @@ mutation createcloud($id: ID!, $user_id: ID, $cloudName: String, $secretId: Stri
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -1221,6 +1259,7 @@ mutation updateschema($updatedAt: String, $schemaState: String, $authWrite: Stri
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -1280,6 +1319,7 @@ mutation createapiGWPath($apiGWName: String, $updatedAt: String, $apiGWGroup_id:
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -1327,8 +1367,10 @@ mutation createproject($updatedAt: String, $database_id: ID, $apiGWGroup_id: ID,
       title
       deployedNum
       id
+      detailDescription
 
 
+      detailImages
       img
     }
     createdAt
@@ -1382,6 +1424,7 @@ mutation createproject($updatedAt: String, $database_id: ID, $apiGWGroup_id: ID,
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -1444,6 +1487,7 @@ mutation updatewxConfig($updatedAt: String, $mch_id: String, $appName: String, $
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -1465,8 +1509,8 @@ mutation deletefc($id: ID, $user_id: ID, $cloud_id: ID, $fcType: String, $schema
   deletefc: delete_fc(id: $id user_id: $user_id cloud_id: $cloud_id fcType: $fcType schema_id: $schema_id wxConfig_id: $wxConfig_id createdAt: $createdAt updatedAt: $updatedAt)
 }
 
-mutation updateuser($email: String, $updatedAt: String, $password: String, $telephone: String, $nickname: String, $username: String, $createdAt: String, $openid: String, $id: ID, $avatar: String) {
-  updateuser: update_user(email: $email updatedAt: $updatedAt password: $password telephone: $telephone nickname: $nickname username: $username createdAt: $createdAt openid: $openid id: $id avatar: $avatar) {
+mutation updateuser($email: String, $updatedAt: String, $password: String, $telephone: String, $nickname: String, $username: String, $createdAt: String, $openid: String, $language: String, $id: ID, $avatar: String) {
+  updateuser: update_user(email: $email updatedAt: $updatedAt password: $password telephone: $telephone nickname: $nickname username: $username createdAt: $createdAt openid: $openid language: $language id: $id avatar: $avatar) {
     email
     updatedAt
     password
@@ -1475,6 +1519,7 @@ mutation updateuser($email: String, $updatedAt: String, $password: String, $tele
     username
     createdAt
     openid
+    language
     id
     avatar
   }
@@ -1517,8 +1562,10 @@ mutation updateproject($updatedAt: String, $database_id: ID, $apiGWGroup_id: ID,
       title
       deployedNum
       id
+      detailDescription
 
 
+      detailImages
       img
     }
     createdAt
@@ -1572,6 +1619,7 @@ mutation updateproject($updatedAt: String, $database_id: ID, $apiGWGroup_id: ID,
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -1623,6 +1671,7 @@ mutation updatefc($id: ID, $user_id: ID, $cloud_id: ID, $fcType: String, $schema
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -1697,6 +1746,7 @@ mutation createschema($updatedAt: String, $schemaState: String, $authWrite: Stri
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -1704,8 +1754,8 @@ mutation createschema($updatedAt: String, $schemaState: String, $authWrite: Stri
   }
 }
 
-mutation createcase($description: String, $updatedAt: String, $createdAt: String, $type: String, $title: String, $deployedNum: Int, $id: ID!, $user_id: ID, $schema_id: ID, $img: String) {
-  createcase: create_case(description: $description updatedAt: $updatedAt createdAt: $createdAt type: $type title: $title deployedNum: $deployedNum id: $id user_id: $user_id schema_id: $schema_id img: $img) {
+mutation createcase($description: String, $updatedAt: String, $createdAt: String, $type: String, $title: String, $deployedNum: Int, $id: ID!, $detailDescription: String, $user_id: ID, $schema_id: ID, $detailImages: String, $img: String) {
+  createcase: create_case(description: $description updatedAt: $updatedAt createdAt: $createdAt type: $type title: $title deployedNum: $deployedNum id: $id detailDescription: $detailDescription user_id: $user_id schema_id: $schema_id detailImages: $detailImages img: $img) {
     description
     updatedAt
     createdAt
@@ -1713,6 +1763,7 @@ mutation createcase($description: String, $updatedAt: String, $createdAt: String
     title
     deployedNum
     id
+    detailDescription
     user_id {
       email
       updatedAt
@@ -1722,6 +1773,7 @@ mutation createcase($description: String, $updatedAt: String, $createdAt: String
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -1740,12 +1792,13 @@ mutation createcase($description: String, $updatedAt: String, $createdAt: String
 
       authWriteObjects
     }
+    detailImages
     img
   }
 }
 
-mutation updatecase($description: String, $updatedAt: String, $createdAt: String, $type: String, $title: String, $deployedNum: Int, $id: ID, $user_id: ID, $schema_id: ID, $img: String) {
-  updatecase: update_case(description: $description updatedAt: $updatedAt createdAt: $createdAt type: $type title: $title deployedNum: $deployedNum id: $id user_id: $user_id schema_id: $schema_id img: $img) {
+mutation updatecase($description: String, $updatedAt: String, $createdAt: String, $type: String, $title: String, $deployedNum: Int, $id: ID, $detailDescription: String, $user_id: ID, $schema_id: ID, $detailImages: String, $img: String) {
+  updatecase: update_case(description: $description updatedAt: $updatedAt createdAt: $createdAt type: $type title: $title deployedNum: $deployedNum id: $id detailDescription: $detailDescription user_id: $user_id schema_id: $schema_id detailImages: $detailImages img: $img) {
     description
     updatedAt
     createdAt
@@ -1753,6 +1806,7 @@ mutation updatecase($description: String, $updatedAt: String, $createdAt: String
     title
     deployedNum
     id
+    detailDescription
     user_id {
       email
       updatedAt
@@ -1762,6 +1816,7 @@ mutation updatecase($description: String, $updatedAt: String, $createdAt: String
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -1780,6 +1835,7 @@ mutation updatecase($description: String, $updatedAt: String, $createdAt: String
 
       authWriteObjects
     }
+    detailImages
     img
   }
 }
@@ -1800,6 +1856,7 @@ mutation updatedatabase($id: ID, $user_id: ID, $dbName: String, $dbUsername: Str
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -1846,6 +1903,7 @@ mutation createapiGWGroup($environmentName: String, $userStatus: String, $defaul
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -1856,8 +1914,8 @@ mutation deletedatabase($id: ID, $user_id: ID, $dbName: String, $dbUsername: Str
   deletedatabase: delete_database(id: $id user_id: $user_id dbName: $dbName dbUsername: $dbUsername dbPassword: $dbPassword dbHost: $dbHost dbPort: $dbPort createdAt: $createdAt updatedAt: $updatedAt)
 }
 
-mutation deletecase($description: String, $updatedAt: String, $createdAt: String, $type: String, $title: String, $deployedNum: Int, $id: ID, $user_id: ID, $schema_id: ID, $img: String) {
-  deletecase: delete_case(description: $description updatedAt: $updatedAt createdAt: $createdAt type: $type title: $title deployedNum: $deployedNum id: $id user_id: $user_id schema_id: $schema_id img: $img)
+mutation deletecase($description: String, $updatedAt: String, $createdAt: String, $type: String, $title: String, $deployedNum: Int, $id: ID, $detailDescription: String, $user_id: ID, $schema_id: ID, $img: String) {
+  deletecase: delete_case(description: $description updatedAt: $updatedAt createdAt: $createdAt type: $type title: $title deployedNum: $deployedNum id: $id detailDescription: $detailDescription user_id: $user_id schema_id: $schema_id img: $img)
 }
 
 mutation deletedeploy($description: String, $updatedAt: String, $cosBucketName: String, $memorySize: Int, $fc_id: ID, $createdAt: String, $subnetId: String, $cosObjectName: String, $region: String, $vpcId: String, $cosBucketRegion: String, $id: ID, $cloud_id: ID, $user_id: ID, $serviceName: String, $timeout: Int, $handler: String, $functionName: String) {
@@ -1876,6 +1934,7 @@ mutation createdatabase($id: ID!, $user_id: ID, $dbName: String, $dbUsername: St
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -1901,8 +1960,8 @@ mutation deleteschema($updatedAt: String, $schemaState: String, $authWrite: Stri
   deleteschema: delete_schema(updatedAt: $updatedAt schemaState: $schemaState authWrite: $authWrite createdAt: $createdAt authRead: $authRead schemaName: $schemaName reference: $reference id: $id schemaData: $schemaData authReadWrite: $authReadWrite user_id: $user_id)
 }
 
-mutation deleteuser($email: String, $updatedAt: String, $password: String, $telephone: String, $nickname: String, $username: String, $createdAt: String, $openid: String, $id: ID, $avatar: String) {
-  deleteuser: delete_user(email: $email updatedAt: $updatedAt password: $password telephone: $telephone nickname: $nickname username: $username createdAt: $createdAt openid: $openid id: $id avatar: $avatar)
+mutation deleteuser($email: String, $updatedAt: String, $password: String, $telephone: String, $nickname: String, $username: String, $createdAt: String, $openid: String, $language: String, $id: ID, $avatar: String) {
+  deleteuser: delete_user(email: $email updatedAt: $updatedAt password: $password telephone: $telephone nickname: $nickname username: $username createdAt: $createdAt openid: $openid language: $language id: $id avatar: $avatar)
 }
 
 mutation createorder($id: ID!, $user_id: ID, $createdAt: String, $updatedAt: String) {
@@ -1917,6 +1976,7 @@ mutation createorder($id: ID!, $user_id: ID, $createdAt: String, $updatedAt: Str
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -1977,6 +2037,7 @@ mutation updateapiGWPath($apiGWName: String, $updatedAt: String, $apiGWGroup_id:
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -2029,6 +2090,7 @@ mutation createdeploy($description: String, $updatedAt: String, $cosBucketName:
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -2051,6 +2113,7 @@ mutation createfc($id: ID!, $user_id: ID, $cloud_id: ID, $fcType: String, $schem
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -2115,6 +2178,7 @@ mutation updatecloud($id: ID, $user_id: ID, $cloudName: String, $secretId: Strin
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -2139,6 +2203,7 @@ mutation createnotification($id: ID!, $user_id: ID, $type: String, $webhook: Str
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -2164,6 +2229,7 @@ mutation updatenotification($id: ID, $user_id: ID, $type: String, $webhook: Stri
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -2185,6 +2251,7 @@ mutation updateorder($id: ID, $user_id: ID, $createdAt: String, $updatedAt: Stri
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -2243,6 +2310,7 @@ mutation updatedeploy($description: String, $updatedAt: String, $cosBucketName:
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -2286,6 +2354,7 @@ mutation updateapiGWGroup($environmentName: String, $userStatus: String, $defaul
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -2312,6 +2381,7 @@ mutation updateticket($updatedAt: String, $repliedBy: ID, $content: String, $rep
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -2339,6 +2409,7 @@ mutation createticket($updatedAt: String, $repliedBy: ID, $content: String, $rep
       username
       createdAt
       openid
+      language
       id
       avatar
     }
@@ -2369,6 +2440,7 @@ mutation createwxConfig($updatedAt: String, $mch_id: String, $appName: String, $
       username
       createdAt
       openid
+      language
       id
       avatar
     }

+ 104 - 47
src/app/basicVersion/exampleShow/ExampleDetail.js

@@ -1,5 +1,5 @@
 import React, {Component} from 'react';
-import {Layout, Button, notification, Row, Col, Icon, message, Radio} from 'antd';
+import {Layout, Button, notification, Row, Col, Icon, message, Spin} from 'antd';
 import {getCookie} from "../../../cookie";
 import {graphqlUrl} from "../../../config";
 import {SEARCH_APIGROUP} from "../../../gql";
@@ -7,6 +7,7 @@ import {request} from 'graphql-request'
 import {FormattedMessage} from 'react-intl';
 import copy from 'copy-to-clipboard';
 import UserCustom from './UserCustom';
+import GraphiQL from "graphiql";
 
 const {Content} = Layout;
 
@@ -17,7 +18,10 @@ class ExampleDetail extends Component {
             userID: '',
             bucketName: '',
             domain: '',
-            showCustom: false
+            showCustom: false,
+            images: [],
+            description: '',
+            showIDE: false
         };
     }
 
@@ -35,6 +39,10 @@ class ExampleDetail extends Component {
         // 查询跳转来的案例,转成 apigroup id
         let groupID = '';
         if (this.props.location && this.props.location.state) {
+            this.setState({
+                images: this.props.location.state.images,
+                description: this.props.location.state.description
+            });
             switch (this.props.location.state.schemaID) {
                 case 'order_schemaID':
                     this.setState({
@@ -81,8 +89,16 @@ class ExampleDetail extends Component {
         })
     };
 
+    graphQLFetcher = (graphQLParams) => {
+        return fetch(this.state.domain, {
+            method: 'post',
+            headers: {'Content-Type': 'application/json'},
+            body: JSON.stringify(graphQLParams),
+        }).then(response => response.json());
+    };
+
     render() {
-        let {userID, bucketName, domain, showCustom} = this.state;
+        let {userID, bucketName, domain, showCustom, description, images} = this.state;
         return (
             <div className={'deploy-choose-cloud'}>
                 <Layout style={{padding: '24px', minHeight: '300px'}}>
@@ -90,55 +106,96 @@ class ExampleDetail extends Component {
                         {
                             !showCustom ?
                                 <div>
-                                    <div>
-                                        <div className={'schema-name'}><FormattedMessage id='case graphql domain'/>
-                                        </div>
-                                        <div className={'schema-table-list-title'}>
-                                            <Row>
-                                                <Col span={15}><span className={'schema-table-title'}><FormattedMessage
-                                                    id='defaultDomain'/></span></Col>
-                                            </Row>
-                                        </div>
-                                        <div className={'schema-table-list-content'}>
-                                            <Row>
-                                                <Col span={15}>
-                                                    <span className={'schema-table-content'}>{domain} </span>
-                                                    <Icon type="copy" theme="twoTone" onClick={() => {
-                                                        copy(domain);
-                                                        message.success('复制成功.');
-                                                    }}/>
-                                                </Col>
-                                            </Row>
-                                        </div>
+
+                                    <div className="column-menu" onClick={() => {
+                                        this.props.history.push({
+                                            pathname: '/common'
+                                        })
+                                    }}>
+                                        <Icon type="left" style={{color: '#3187FA'}}/> <FormattedMessage
+                                        id="back to all case show"/>
                                     </div>
 
+                                    <Row>
+                                        <Col span={18}>
+                                            <div>
+                                                <div className={'schema-name'}><FormattedMessage id='detail'/></div>
+                                                <div>{description ? description : '暂无简介'}</div>
+                                                <div className={'detail-images'}>
+                                                    {
+                                                        images.map(img => (
+                                                            <img src={img} alt="" height="500"/>
+                                                        ))
+                                                    }
+                                                </div>
+                                            </div>
 
-                                    <div style={{marginTop: 20, fontSize: 20}}>
-                                        <div className={'schema-name'}><FormattedMessage id='detail'/></div>
-                                        这里巴拉巴拉
-                                    </div>
+                                            <div style={{marginTop: 100}}>
+                                                <div className={'schema-name'}><FormattedMessage id='case graphql domain'/>
+                                                </div>
+                                                <div className={'schema-table-list-title'}>
+                                                    <Row>
+                                                        <Col span={15}><span className={'schema-table-title'}><FormattedMessage
+                                                            id='defaultDomain'/></span></Col>
+                                                    </Row>
+                                                </div>
+                                                <div className={'schema-table-list-content'}>
+                                                    <Row>
+                                                        <Col span={10}>
+                                                            {
+                                                                domain ?
+                                                                    <div>
+                                                                        <span className={'schema-table-content'}>{domain} </span>
+                                                                        <Icon type="copy" theme="twoTone" onClick={() => {
+                                                                            copy(domain);
+                                                                            message.success('复制成功.');
+                                                                        }}/>
+                                                                    </div>
+                                                                    :
+                                                                    <Spin/>
+                                                            }
 
+                                                        </Col>
+                                                        <Col span={4}>
+                                                            <Button style={{marginTop: 10}} size={'small'} onClick={()=>{this.setState({showIDE: !this.state.showIDE})}}>{this.state.showIDE? 'closeIDE': 'showIDE'}</Button>
+                                                        </Col>
+                                                    </Row>
+                                                </div>
+                                            </div>
+
+                                            {
+                                                this.state.showIDE?
+                                                    <div style={{marginTop: 20}}>
+                                                        <GraphiQL fetcher={this.graphQLFetcher}/>
+                                                    </div>
+                                                    :
+                                                    ''
+                                            }
+                                        </Col>
+                                        <Col span={6} >
+                                            <div style={{marginTop: 50}}>
+                                                <div className={'choose-cloud-button-group'}>
+                                                    <Button className={'choose-cloud-button'} type='primary' onClick={() => {
+                                                        if (userID === '') {
+                                                            notification['warning']({
+                                                                message: '需要登录',
+                                                                description: '后续使用,需要先登录',
+                                                            });
+
+                                                            this.props.history.push({
+                                                                pathname: `/login`
+                                                            })
+                                                        } else {
+                                                            this.setState({
+                                                                showCustom: true
+                                                            })
+                                                        }
+                                                    }}>更近一步</Button>
+                                                </div>
+                                            </div>
+                                        </Col>
+                                    </Row>
 
-                                    <div style={{marginTop: 20}}>
-                                        <div className={'choose-cloud-button-group'}>
-                                            <Button className={'choose-cloud-button'} type='primary' onClick={() => {
-                                                if (userID === '') {
-                                                    notification['warning']({
-                                                        message: '需要登录',
-                                                        description: '后续使用,需要先登录',
-                                                    });
-
-                                                    this.props.history.push({
-                                                        pathname: `/login`
-                                                    })
-                                                } else {
-                                                    this.setState({
-                                                        showCustom: true
-                                                    })
-                                                }
-                                            }}>自定义参数设置</Button>
-                                        </div>
-                                    </div>
                                 </div>
                                 :
                                 <UserCustom

+ 4 - 2
src/app/basicVersion/exampleShow/ExampleShow.jsx

@@ -64,10 +64,12 @@ class ExampleShow extends Component {
                                                         pathname: `/common/deploy-cloud-choose`,
                                                         state: {
                                                             schemaID: item.schema_id.id,
-                                                            caseID: item.id
+                                                            caseID: item.id,
+                                                            images: item.detailImages,
+                                                            description: item.detailDescription
                                                         }
                                                     });
-                                                }}>部署</Button>
+                                                }}>进一步</Button>
                                             ]}
                                         >
                                             <Meta

+ 30 - 23
src/app/basicVersion/exampleShow/UserCustom.js

@@ -366,6 +366,7 @@ class CloudQueryAndConfig extends Component {
     }
 
     searchCloud = () => {
+        this._isMounted = true;
         let {userID, cloudName} = this.state;
         // 如果登录,查询该用户是否设置 cloud
         request(graphqlUrl, SHOW_CLOUD, {user_id: userID}).then(data => {
@@ -374,38 +375,29 @@ class CloudQueryAndConfig extends Component {
                 if (clouds.length === 1) {
                     let cloud = clouds[0];
                     let {id, secretId, secretKey, appId} = cloud;
-                    this.setState({
-                        cloudID: id,
-                        secretID: secretId,
-                        secretKey,
-                        appId
-                    });
+                    if(this._isMounted) {
+                        this.setState({
+                            cloudID: id,
+                            secretID: secretId,
+                            secretKey,
+                            appId,
+                            showCloudConfigTip: false
+                        });
+                    }
                     this.props.getCloudDetail(id, secretId, secretKey, appId);
-                    this.setState({
-                        showCloudConfigTip: false
-                    })
                 } else if (clouds.length > 1) {
                     console.log('数据库有多个同一云服务商的 key');
                 } else {
-                    this.setState({
-                        showCloudConfigTip: true
-                    })
+                    if(this._isMounted) {
+                        this.setState({
+                            showCloudConfigTip: true
+                        })
+                    }
                 }
             }
         )
     };
 
-    componentWillMount() {
-        this.searchCloud()
-    }
-
-    componentWillReceiveProps(next) {
-        this.setState({
-            cloudName: next.cloudName,
-            userID: next.userID,
-        }, this.searchCloud);
-    }
-
     showModal = () => {
         this.setState({
             visible: true,
@@ -419,6 +411,21 @@ class CloudQueryAndConfig extends Component {
         this.props.reCheck();
     };
 
+    componentWillMount() {
+        this.searchCloud();
+        this._isMounted = true;
+    }
+
+    componentWillUnmount() {
+        this._isMounted = false;
+    }
+
+    componentWillReceiveProps(next) {
+        this.setState({
+            cloudName: next.cloudName,
+            userID: next.userID,
+        }, this.searchCloud);
+    }
 
     render() {
         let {showCloudConfigTip, visible, confirmLoading} = this.state;

+ 8 - 3
src/app/basicVersion/exampleShow/index.css

@@ -43,11 +43,16 @@
 }
 
 .choose-cloud-button-group {
-    position: absolute;
-    right: 100px;
-    bottom: 50px;
+    position: fixed;
 }
 
 .choose-cloud-button {
     margin-left: 20px;
+}
+
+.detail-images {
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: space-around;
+    margin-top: 20px;
 }

+ 2 - 2
src/app/developVersion/graphqlService/component/generateJs/GenerateJs.jsx

@@ -59,8 +59,8 @@ class GenerateJs extends Component {
         this._isMounted = true;
         let _this = this;
         let {schemaID} = this.state;
-        // axios.get(`${genJsUrl}?schema=${'onlineSchema'}`)
-        axios.get(`${genJsUrl}?schema=${schemaID}`)
+        axios.get(`${genJsUrl}?schema=${'onlineSchema'}`)
+        // axios.get(`${genJsUrl}?schema=${schemaID}`)
             .then((res) => {
                 if(this._isMounted){
                     if (res.data !== '') {

+ 8 - 2
src/gql.js

@@ -38,8 +38,9 @@ const SEARCH_USER = `
         `;
 
 const ADD_USER = `
-            mutation USER($email: String, $updatedAt: String, $password: String, $telephone: String, $nickname: String, $username: String, $createdAt: String, $openid: String, $id: ID!, $avatar: String) {
+            mutation USER($email: String, $language: String, $updatedAt: String, $password: String, $telephone: String, $nickname: String, $username: String, $createdAt: String, $openid: String, $id: ID!, $avatar: String) {
                 create_user(
+                    language: $language
                     email: $email 
                     updatedAt: $updatedAt 
                     password: $password 
@@ -51,6 +52,7 @@ const ADD_USER = `
                     id: $id 
                     avatar: $avatar
                 ) {
+                    language
                     email
                     updatedAt
                     password
@@ -67,9 +69,10 @@ const ADD_USER = `
         `;
 
 const UPDATE_USER = `
-            mutation USER($email: String, $updatedAt: String, $telephone: String, $nickname: String, $openid: String, $id: ID!, $avatar: String) {
+            mutation USER($email: String, $language: String, $updatedAt: String, $telephone: String, $nickname: String, $openid: String, $id: ID!, $avatar: String) {
                 update_user(
                     id: $id
+                    language: $language
                     email: $email 
                     updatedAt: $updatedAt 
                     telephone: $telephone 
@@ -77,6 +80,7 @@ const UPDATE_USER = `
                     openid: $openid
                     avatar: $avatar
                 ) {
+                    language
                     email
                     updatedAt
                     password
@@ -1058,6 +1062,8 @@ const SHOW_CASE = `
                     deployedNum
                     title
                     description
+                    detailDescription
+                    detailImages
                 }
             }
         `;

+ 2 - 1
src/language/en_US.js

@@ -173,6 +173,7 @@ const en_US = {
     'aliyun': 'Aliyun',
     'amazon cloud': 'AWS',
     'no this cloud, click to save': 'no this cloud, click to save',
-    'back to case show': 'back to case show'
+    'back to case show': 'back to case show',
+    'back to all case show': 'back to case store'
 };
 export default en_US;

+ 5 - 4
src/language/zh_CN.js

@@ -159,21 +159,22 @@ const zh_CN = {
 
     'Submit Support Ticket': '提交工单',
 
-    'Example': '例',
+    'Example': '例',
     'My deploy': '我的部署',
     'Communication': '交流',
     'loading': '加载中...',
     'nothing': '暂无部署...',
     'new': '新!',
     'go to deploy,then see more': '部署以查看更多',
-    'case graphql domain': '案例 graphql 地址',
+    'case graphql domain': '尝试使用 graphql 操作数据',
     'Cloud Setting': '云服务商参数',
     'DB Choose': '选择数据库类型',
-    'detail': '详情',
+    'detail': '案例详情',
     'tencent cloud': '腾讯云',
     'aliyun': '阿里云',
     'amazon cloud': 'AWS',
     'no this cloud, click to save': '没有该服务商的 key,点我设置',
-    'back to case show': '返回案例'
+    'back to case show': '返回该案例',
+    'back to all case show': '返回案例商城'
 };
 export default zh_CN;