|
@@ -14,6 +14,8 @@ import PagerUtil from './PagerUtil';
|
|
|
import BadgeSelectItem from '../../components/BadgeSelectItem';
|
|
import BadgeSelectItem from '../../components/BadgeSelectItem';
|
|
|
import TextView from '../../components/TextView';
|
|
import TextView from '../../components/TextView';
|
|
|
import { MyRefreshProps } from '../../components/ThemesConfig';
|
|
import { MyRefreshProps } from '../../components/ThemesConfig';
|
|
|
|
|
+import { QRResult } from '../charge/QRScan';
|
|
|
|
|
+import { PagerList } from './ChargeAdapter';
|
|
|
|
|
|
|
|
export default class TabReserve extends Component {
|
|
export default class TabReserve extends Component {
|
|
|
constructor(props) {
|
|
constructor(props) {
|
|
@@ -185,7 +187,9 @@ export default class TabReserve extends Component {
|
|
|
|
|
|
|
|
startCountdown() {
|
|
startCountdown() {
|
|
|
if (this.state.userReserve.reserveEndTimeTimestamp > 0) {
|
|
if (this.state.userReserve.reserveEndTimeTimestamp > 0) {
|
|
|
- PagerUtil.onReserve(this.props);
|
|
|
|
|
|
|
+ if (!QRResult.haveResult()) {
|
|
|
|
|
+ PagerUtil.onReserve(this.props);
|
|
|
|
|
+ }
|
|
|
const leftId = this.state.leftId;
|
|
const leftId = this.state.leftId;
|
|
|
this.countdown(leftId);
|
|
this.countdown(leftId);
|
|
|
} else {
|
|
} else {
|
|
@@ -253,6 +257,9 @@ export default class TabReserve extends Component {
|
|
|
|
|
|
|
|
enterStatioinId() {
|
|
enterStatioinId() {
|
|
|
PagerUtil.onEnterStation(this.props);
|
|
PagerUtil.onEnterStation(this.props);
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ PagerUtil.setRefreshing(PagerList.tabCharge)
|
|
|
|
|
+ }, 300);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
render() {
|
|
@@ -456,6 +463,7 @@ export default class TabReserve extends Component {
|
|
|
text={$t('charging.scanQR')}
|
|
text={$t('charging.scanQR')}
|
|
|
disabled={this.state.available}
|
|
disabled={this.state.available}
|
|
|
onClick={() => {
|
|
onClick={() => {
|
|
|
|
|
+ PagerUtil.onInnerScanQR();
|
|
|
startPage(PageList.scanqr, {actionDetail: false, id: this.state.stationInfo.id});
|
|
startPage(PageList.scanqr, {actionDetail: false, id: this.state.stationInfo.id});
|
|
|
}}/>
|
|
}}/>
|
|
|
<Button
|
|
<Button
|