|
@@ -101,7 +101,14 @@ export default class ChargingPage extends Component {
|
|
|
getConnectorInfo() {
|
|
getConnectorInfo() {
|
|
|
if (!this.isPageShow) return;
|
|
if (!this.isPageShow) return;
|
|
|
//this.init();
|
|
//this.init();
|
|
|
- apiCharge.getConnectorDetail(this.state.stationInfo).then(res => {
|
|
|
|
|
|
|
+ const params = {
|
|
|
|
|
+ sitePk: this.state.stationInfo.id,
|
|
|
|
|
+ chargeBoxId: this.state.stationInfo.chargeBoxId,
|
|
|
|
|
+ connectorId: this.state.stationInfo.connectorId,
|
|
|
|
|
+ paymentOption: this.state.currentPayment
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log("参数", params);
|
|
|
|
|
+ apiCharge.getConnectorDetail(params).then(res => {
|
|
|
if (res.data.status && !this.state.isStoping) {
|
|
if (res.data.status && !this.state.isStoping) {
|
|
|
const state = {
|
|
const state = {
|
|
|
isStoping: false,
|
|
isStoping: false,
|
|
@@ -127,7 +134,19 @@ export default class ChargingPage extends Component {
|
|
|
this.waitAuthentic = false;
|
|
this.waitAuthentic = false;
|
|
|
if (this.waitStartCharging) {
|
|
if (this.waitStartCharging) {
|
|
|
state.isCharging = true;
|
|
state.isCharging = true;
|
|
|
- this.refreshChargeData(3000);
|
|
|
|
|
|
|
+ if (res.data.payPerUsePaymentStatus) {
|
|
|
|
|
+ //等待PayPerUse支付-初始化充电
|
|
|
|
|
+ if (res.data.payPerUsePaymentStatus == "PENDING" || res.data.payPerUsePaymentStatus == "PAID") {
|
|
|
|
|
+ this.refreshChargeData(3000);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.showErrorDialog('A4', $t('charging.errPayperusePayment') + res.data.payPerUsePaymentStatus);
|
|
|
|
|
+ state.isCharging = false;
|
|
|
|
|
+ state.isAuthentic = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ //普通充电-初始化充电
|
|
|
|
|
+ this.refreshChargeData(3000);
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
state.isAuthentic = true;
|
|
state.isAuthentic = true;
|
|
|
//this.checkIsCharge();
|
|
//this.checkIsCharge();
|
|
@@ -140,7 +159,19 @@ export default class ChargingPage extends Component {
|
|
|
break;
|
|
break;
|
|
|
case 'Initiating': //充电确认中
|
|
case 'Initiating': //充电确认中
|
|
|
state.isCharging = true;
|
|
state.isCharging = true;
|
|
|
- this.refreshChargeData();
|
|
|
|
|
|
|
+ if (res.data.payPerUsePaymentStatus) {
|
|
|
|
|
+ //等待PayPerUse支付-初始化充电
|
|
|
|
|
+ if (res.data.payPerUsePaymentStatus == "PENDING" || res.data.payPerUsePaymentStatus == "PAID") {
|
|
|
|
|
+ this.refreshChargeData();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.showErrorDialog('A4', $t('charging.errPayperusePayment') + res.data.payPerUsePaymentStatus);
|
|
|
|
|
+ state.isCharging = false;
|
|
|
|
|
+ state.isAuthentic = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ //普通充电-初始化充电
|
|
|
|
|
+ this.refreshChargeData();
|
|
|
|
|
+ }
|
|
|
break;
|
|
break;
|
|
|
case 'SuspendedEVSE':
|
|
case 'SuspendedEVSE':
|
|
|
this.showErrorDialog('A5', $t('charging.errUnable2Charge'));
|
|
this.showErrorDialog('A5', $t('charging.errUnable2Charge'));
|