kulley 7 jaren geleden
bovenliggende
commit
f098529e8f
2 gewijzigde bestanden met toevoegingen van 7 en 6 verwijderingen
  1. 2 2
      src/app/basicVersion/BasicVersion.jsx
  2. 5 4
      src/app/basicVersion/exampleShow/ExampleDetail.js

+ 2 - 2
src/app/basicVersion/BasicVersion.jsx

@@ -7,7 +7,7 @@ import '../developVersion/index.css';
 import ExampleShow from "./exampleShow/ExampleShow";
 import MyDeploy from "./myDeploy/MyDeploy";
 import Communication from "./communication/Communication";
-import DeployCloudChoose from "./exampleShow/DeployCloudChoose";
+import ExampleDetail from "./exampleShow/ExampleDetail";
 import {logoutUrl} from "../../config";
 import {getCookie, setCookie} from "../../cookie";
 import {GET_USER} from "../../gql";
@@ -167,7 +167,7 @@ class BasicVersion extends Component {
                         <Route path="/common/example" exact component={ExampleShow}/>
                         <Route path="/common/deploy" component={MyDeploy}/>
                         <Route path="/common/communication" component={Communication}/>
-                        <PrivateRoute path="/common/deploy-cloud-choose" component={DeployCloudChoose} ownProps={ownProps}/>
+                        <PrivateRoute path="/common/deploy-cloud-choose" component={ExampleDetail} ownProps={ownProps}/>
                     </Switch>
                 </Layout>
 

+ 5 - 4
src/app/basicVersion/exampleShow/DeployCloudChoose.js → src/app/basicVersion/exampleShow/ExampleDetail.js

@@ -16,12 +16,12 @@ const {Content} = Layout;
 const RadioGroup = Radio.Group;
 axios.defaults.withCredentials = true;
 
-class DeployCloudChoose extends Component {
+class ExampleDetail extends Component {
     constructor() {
         super();
         this.state = {
             userID: '',
-            check: new Date().getTime(),
+            check: 0,
 
             disableDeployButton: false,
             domain: '',
@@ -347,7 +347,7 @@ class DeployCloudChoose extends Component {
                                             <CloudQueryAndConfig cloudName={cloudName} userID={userID}
                                                                  getCloudDetail={this.getCloudDetail} check={check}
                                                                  reCheck={() => {
-                                                                     this.setState({check: new Date().getTime()})
+                                                                     this.setState({check: check+1})
                                                                  }}/>
                                         </div>
                                         <div style={{marginTop: 20}}>
@@ -442,7 +442,7 @@ class DeployCloudChoose extends Component {
     }
 }
 
-export default DeployCloudChoose
+export default ExampleDetail
 
 class CloudQueryAndConfig extends Component {
     constructor(props) {
@@ -496,6 +496,7 @@ class CloudQueryAndConfig extends Component {
     }
 
     componentWillReceiveProps(next) {
+        console.log(next);
         this.setState({
             cloudName: next.cloudName,
             userID: next.userID,