浏览代码

修复初始化 deply 页面

xy 7 年之前
父节点
当前提交
cd17863fe9

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

@@ -75,7 +75,8 @@ class TencentConfig extends Component {
     };
 
     render() {
-        let {userID, projectID, trialcase} = this.props;
+        let projectID = this.props.projectID ? this.props.projectID : 'ecommerce_projectID';
+
         return (
             <Query query={gql(GET_PROJECT)} variables={{id: projectID}}>
                 {

+ 3 - 4
src/app/graphqlService/TrialCase.jsx

@@ -50,10 +50,9 @@ class TrialCase extends Component {
     }
 
     render() {
-        let schemaID = this.props.history.location.state ? this.props.history.location.state.schemaID : "ecommerce_schemaID";
-        let schemaName = this.props.history.location.state ? this.props.history.location.state.schemaName : "ecommerce";
-        let projectID = this.props.history.location.state ? this.props.history.location.state.projectID : "";
-        let _this = this;
+        let schemaID = this.props.location.state ? this.props.location.state.schemaID : "ecommerce_schemaID";
+        let schemaName = this.props.location.state ? this.props.location.state.schemaName : "ecommerce";
+        let projectID = this.props.location.state ? this.props.location.state.projectID : "";
         return (
             <div>
                 <Menu

+ 3 - 3
src/app/graphqlService/UserCreate.jsx

@@ -47,9 +47,9 @@ class UserCreate extends Component {
 
 
     render() {
-        let schemaID = this.props.history.location.state ? this.props.history.location.state.schemaID : "ecommerce_schemaID";
-        let schemaName = this.props.history.location.state ? this.props.history.location.state.schemaName : "ecommerce";
-        let projectID = this.props.history.location.state ? this.props.history.location.state.projectID : "";
+        let schemaID = this.props.location.state ? this.props.location.state.schemaID : "ecommerce_schemaID";
+        let schemaName = this.props.location.state ? this.props.location.state.schemaName : "ecommerce";
+        let projectID = this.props.location.state ? this.props.location.state.projectID : "";
         return (
             <div>
                 <Menu

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

@@ -24,9 +24,9 @@ class WxTrialCase extends Component {
     };
 
     render() {
-        let configID = this.props.history.location.state ? this.props.history.location.state.configID : "ecommerce_wxConfigID";
-        let appName = this.props.history.location.state ? this.props.history.location.state.appName : "ecommerce";
-        let projectID = this.props.history.location.state ? this.props.history.location.state.projectID : "";
+        let configID = this.props.location.state ? this.props.location.state.configID : "ecommerce_wxConfigID";
+        let appName = this.props.location.state ? this.props.location.state.appName : "ecommerce";
+        let projectID = this.props.location.state ? this.props.location.state.projectID : "";
         return (
             <div>
                 <Menu

+ 3 - 3
src/app/wechatService/WxUserCreate.js

@@ -45,9 +45,9 @@ class WxUserCreate extends Component {
     };
 
     render() {
-        let configID = this.props.history.location.state ? this.props.history.location.state.configID : "ecommerce_wxConfigID";
-        let appName = this.props.history.location.state ? this.props.history.location.state.appName : "ecommerce";
-        let projectID = this.props.history.location.state ? this.props.history.location.state.projectID : "";
+        let configID = this.props.location.state ? this.props.location.state.configID : "ecommerce_wxConfigID";
+        let appName = this.props.location.state ? this.props.location.state.appName : "ecommerce";
+        let projectID = this.props.location.state ? this.props.location.state.projectID : "";
         return (
             <div>
                 <Menu