|
|
@@ -45,7 +45,7 @@ export default class ChargingPage extends Component {
|
|
|
//测试进入
|
|
|
//this.testInit();
|
|
|
//正常进入
|
|
|
- this.getConnectorInfo();
|
|
|
+ this.refreshChargeData(0);
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
@@ -57,9 +57,7 @@ export default class ChargingPage extends Component {
|
|
|
status: "Initiating"
|
|
|
}
|
|
|
}, () => {
|
|
|
- setTimeout(() => {
|
|
|
- this.getConnectorInfo();
|
|
|
- }, 2000);
|
|
|
+ this.refreshChargeData(2000);
|
|
|
})
|
|
|
}
|
|
|
|
|
|
@@ -160,12 +158,12 @@ export default class ChargingPage extends Component {
|
|
|
});
|
|
|
break;
|
|
|
}
|
|
|
- this.setState(state)
|
|
|
+ this.setState(state);
|
|
|
}
|
|
|
}).catch(err => {
|
|
|
Dialog.showResultDialog("An error occurred:\n" + err, "Retry", () => {
|
|
|
this.getConnectorInfo();
|
|
|
- })
|
|
|
+ });
|
|
|
//toastShort(err)
|
|
|
})
|
|
|
}
|