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