vbea 2 лет назад
Родитель
Сommit
59c4cf5099

+ 2 - 2
Strides-APP/app/components/BottomModal.js

@@ -7,7 +7,7 @@ export const ModalProps = {
   animationIn: "fadeIn",
   animationOut: "fadeOut",
   propagateSwipe: true,
-  useNativeDriver: true,
+  useNativeDriver: !isIOS,
   hideModalContentWhileAnimating: true
 }
 
@@ -17,7 +17,7 @@ export default BottomModal = ({visible=false, onHide, children}) => {
       isVisible={visible}
       onBackButtonPress={onHide}
       onBackdropPress={onHide}
-      useNativeDriver={true}
+      useNativeDriver={!isIOS}
       style={styles.bottomModalView}>
       <View style={styles.bottomModalContent}>
         {children}

+ 5 - 0
Strides-APP/app/pages/wallet/Overview.js

@@ -10,6 +10,7 @@ import apiWallet from '../../api/apiWallet';
 import Svg, { Defs, LinearGradient, Stop } from 'react-native-svg';
 import utils from '../../utils/utils';
 import TextView from '../../components/TextView';
+import Dialog from '../../components/Dialog';
 
 const chartThemes = "#A6EB7C"; //配置柱状图颜色
 
@@ -32,6 +33,7 @@ export default class Overview extends Component {
 
   componentDidMount() {
     console.log("概述", this.props);
+    Dialog.showProgressDialog();
     if (!this.props.skeleton)
       this.getOverview();
   }
@@ -125,6 +127,9 @@ export default class Overview extends Component {
       this.props.refreshed();
     }
     this.refreshing = false;
+    setTimeout(() => {
+      Dialog.dismissLoading();
+    }, 2000);
   }
 
   barTheme = (active) => ({

+ 14 - 4
Strides-APP/app/pages/wallet/Wallet.js

@@ -11,6 +11,7 @@ import Overview from './Overview';
 import { MyRefreshProps } from '../../components/ThemesConfig';
 import { ElevationObject } from '../../components/Button';
 import TextView from '../../components/TextView';
+import Dialog from '../../components/Dialog';
 
 export default class Wallet extends Component {
   constructor(props) {
@@ -22,30 +23,39 @@ export default class Wallet extends Component {
       tabWidth: 0,
       tabHeight: 0,
       balanceText: '',
-      pageShown: false
+      pageShown: true
     };
   }
 
   componentDidMount() {
     this.props.navigation.addListener('focus', () => {
       this.onRefresh();
+      this.setState({
+        pageShown: true
+      })
       getUserInfo(info => {
         this.setState({
           balance: info.credit,
-          balanceText: info.creditStr,
-          pageShown: true
+          balanceText: info.creditStr
         })
       }, true)
     });
+    this.props.navigation.addListener('blur', () => {
+      this.setState({
+        pageShown: false
+      })
+    });
     this.props.navigation.addListener('beforeRemove', (e) => {
       if (this.state.pageShown) {
         e.preventDefault();
+        Dialog.showProgressDialog();
         this.setState({
           pageShown: false
         }, () => {
           setTimeout(() => {
+            Dialog.dismissLoading();
             goBack();
-          }, 100);
+          }, 500);
         });
       }
     });