vbea 2 years ago
parent
commit
678f858938
1 changed files with 6 additions and 4 deletions
  1. 6 4
      Strides-APP/app/pages/wallet/Overview.js

+ 6 - 4
Strides-APP/app/pages/wallet/Overview.js

@@ -34,8 +34,10 @@ export default class Overview extends Component {
   componentDidMount() {
   componentDidMount() {
     console.log("概述", this.props);
     console.log("概述", this.props);
     Dialog.showProgressDialog();
     Dialog.showProgressDialog();
-    if (!this.props.skeleton)
+    if (!this.props.skeleton) {
+      this.refreshing = true;
       this.getOverview();
       this.getOverview();
+    }
   }
   }
 
 
   componentDidUpdate() {
   componentDidUpdate() {
@@ -43,7 +45,7 @@ export default class Overview extends Component {
       if (this.props.refresh && !this.refreshing) {
       if (this.props.refresh && !this.refreshing) {
         this.refreshing = true;
         this.refreshing = true;
         this.getOverview();
         this.getOverview();
-      } else if (this.state.skeleton) {
+      } else if (this.state.skeleton && !this.refreshing) {
         this.refreshing = true;
         this.refreshing = true;
         this.getOverview();
         this.getOverview();
       } else if (!this.state.chartReady) {
       } else if (!this.state.chartReady) {
@@ -51,7 +53,7 @@ export default class Overview extends Component {
           this.setState({
           this.setState({
             chartReady: true
             chartReady: true
           })
           })
-        }, 100);
+        }, 500);
       }
       }
     } else if (this.state.chartReady) {
     } else if (this.state.chartReady) {
       this.setState({
       this.setState({
@@ -129,7 +131,7 @@ export default class Overview extends Component {
     this.refreshing = false;
     this.refreshing = false;
     setTimeout(() => {
     setTimeout(() => {
       Dialog.dismissLoading();
       Dialog.dismissLoading();
-    }, 2000);
+    }, 300);
   }
   }
 
 
   barTheme = (active) => ({
   barTheme = (active) => ({