Parcourir la source

update app/pages/chargeV2/ChargeAdapter.js

wudebin il y a 3 mois
Parent
commit
a6c4e5e8dc

+ 8 - 3
Strides-SPAPP/app/pages/chargeV2/ChargeAdapter.js

@@ -9,7 +9,7 @@ import TabInfos from './TabInfos';
 import TabCharge from './TabCharge';
 import Reserve from './TabReserve';
 import TabInfosV3 from '../chargeV3/TabInfos';
-import { QRResult } from '../charge/QRScan';
+import QRResult from '../charge/QRResult';
 import apiStation from '../../api/apiStation';
 import PagerUtil from './PagerUtil';
 import utils from '../../utils/utils';
@@ -17,6 +17,7 @@ import { Styles } from '../../components/Toolbar';
 import { getFocusedRouteNameFromRoute } from '@react-navigation/core';
 import app from '../../../app.json';
 import HeaderTitle from '../../components/HeaderTitle';
+import { PageList } from '../Router';
 
 export const PagerList = {
   "tabInfo": "Info",
@@ -92,7 +93,7 @@ export default class ChargeAdapter extends Component {
         this.canShowLoginDialog();
       });
     }
-    this.backHandler = BackHandler.addEventListener('hardwareBackPress', this.backPage)
+    //this.backHandler = BackHandler.addEventListener('hardwareBackPress', this.backPage)
     PagerUtil.addOnRefresh(this);
     PagerUtil.setSelectedVoucher({});
     // setTimeout(() => {
@@ -125,7 +126,11 @@ export default class ChargeAdapter extends Component {
   backPage = () => {
     const params = this.props.route.params;
     if (params.from && !this.isHide) {
-      startPage(params.from);
+      if (params.from == PageList.home) {
+        startPage(params.from);
+      } else {
+        goBack();
+      }
       return true;
     }
   }

+ 1 - 1
Strides-SPAPP/app/pages/chargeV3/ChargingStartView.js

@@ -18,7 +18,7 @@ export default ChargingStartView = ({
   onIntoCharging
 }) => (
   <View>
-    <View style={{minHeight: $vht(80)}}>
+    <View style={{minHeight: $vht(70)}}>
       <EndView/>
       <View style={ui.flexcc}>
         <MaterialIcons