xy 7 роки тому
батько
коміт
755fcd42f5

+ 1 - 1
src/app/common/deploy/Deploy.jsx

@@ -37,7 +37,7 @@ class Deploy extends Component {
 
     render() {
         const contentListNoTitle = {
-            tencent: <TencentConfig userID={this.props.userID} projectID={this.props.projectID} trialcase={this.props.trialcase}/>,
+            tencent: <TencentConfig userID={this.props.userID} projectID={this.props.projectID} trialcase={this.props.trialcase} kind={this.props.kind}/>,
             aliyun: <AliConfig/>,
             amazon: <AmazonConfig/>,
         };

+ 1 - 1
src/app/common/deploy/tencent/TencentConfig.js

@@ -30,7 +30,7 @@ class TencentConfig extends Component {
     }
 
     componentWillMount() {
-        let projectID = this.props.projectID ? this.props.projectID : 'ecommerce_projectID';
+        let projectID = this.props.projectID ? this.props.projectID : this.props.kind === 'graphql' ? 'ecommerce_projectID' : 'ecommerce_projectID_wx';
 
         request(graphqlUrl, GET_PROJECT, {id: projectID}).then(
             data => {

+ 1 - 1
src/app/common/manage/TencentResult.js

@@ -13,7 +13,7 @@ class TencentResult extends Component {
     }
 
     render() {
-        let projectID = this.props.projectID ? this.props.projectID : 'ecommerce_projectID';
+        let projectID = this.props.projectID ? this.props.projectID : this.props.kind === 'graphql' ? 'ecommerce_projectID' : 'ecommerce_projectID_wx';
         return (
             <Query query={gql(GET_PROJECT)} variables={{id: projectID}} fetchPolicy={'network-only'}>
                 {

+ 2 - 2
src/app/graphqlService/TrialCase.jsx

@@ -87,9 +87,9 @@ class TrialCase extends Component {
                                     case 'schema':
                                         return <Schema trialcase={true} userID={this.state.userID} projectID={projectID} schemaName={schemaName} schemaID={schemaID} history={this.props.history} location={this.props.location}/>;
                                     case 'deploy':
-                                        return <Deploy trialcase={true} userID={this.state.userID} projectID={projectID}/>;
+                                        return <Deploy trialcase={true} userID={this.state.userID} projectID={projectID} kind={'graphql'}/>;
                                     case 'manage':
-                                        return <Manage trialcase={true} userID={this.state.userID} projectID={projectID} switchMenu={this.switchMenu}/>;
+                                        return <Manage trialcase={true} userID={this.state.userID} projectID={projectID} switchMenu={this.switchMenu} kind={'graphql'}/>;
                                     case 'graphiql':
                                         return <Graphql api={this.state.api} projectID={projectID}/>;
                                     case 'template':

+ 2 - 2
src/app/wechatService/WxTrialCase.js

@@ -55,9 +55,9 @@ class WxTrialCase extends Component {
                                 case 'wechat-config':
                                     return <WxConfig trialcase={true} userID={this.state.userID} projectID={projectID} defaultAppName={'ecommerce'} defaultConfigID={'ecommerce_wxConfigID'} history={this.props.history} location={this.props.location}/>;
                                 case 'wechat-deploy':
-                                    return <WxDeploy trialcase={true} userID={this.state.userID} projectID={projectID}/>;
+                                    return <WxDeploy trialcase={true} userID={this.state.userID} projectID={projectID} kind={'wx'}/>;
                                 case 'wechat-manage':
-                                    return <Manage trialcase={true} userID={this.state.userID} projectID={projectID}/>;
+                                    return <Manage trialcase={true} userID={this.state.userID} projectID={projectID} kind={'wx'}/>;
                                 default:
                                     return <WxConfig/>
                             }