浏览代码

Fixed box

vbea 2 年之前
父节点
当前提交
b59a046376

+ 1 - 2
Strides-APP/app/pages/chargingV2/ChargingPage.js

@@ -467,8 +467,7 @@ export default class ChargingPage extends Component {
           : ( this.state.isAuthentic
             ? <StepAuth
                 status={this.state.connectorInfo?.status}
-                chargeBoxId={this.state.stationInfo.chargeBoxId}
-                connectorId={this.state.stationInfo.connectorId}
+                connectorInfo={this.state.connectorInfo}
                 currentPayment={this.state.currentPayment}
                 onStartCharge={() => this.onStartCharge()}
                 selectedVoucher={this.state.selectedVoucher}

+ 4 - 5
Strides-APP/app/pages/chargingV2/StepAuth.js

@@ -3,7 +3,7 @@
  * @邠心vbe on 2023/06/20
  */
 import React, { useEffect, useState } from 'react';
-import { View, Text, Image, StyleSheet, Pressable } from 'react-native';
+import { View, Image, StyleSheet, Pressable } from 'react-native';
 import app from '../../../app.json';
 import Button, { ElevationObject } from '../../components/Button';
 import TextView from '../../components/TextView';
@@ -15,8 +15,7 @@ export default StepAuth = ({
   status="",
   currentPayment,
   onStartCharge,
-  chargeBoxId,
-  connectorId=1,
+  connectorInfo={},
   selectedVoucher={},
   onPaymentMethodChanged
 }) => {
@@ -87,7 +86,7 @@ export default StepAuth = ({
             ? <PaymentListV2
                 isSelect={isAuthentic}
                 payType={currentPayment}
-                chargeBoxId={chargeBoxId}
+                chargeBoxId={connectorInfo.chargeBoxId}
                 onMethodChange={onPaymentMethodChanged}/>
             : <PaymentList
                 isSelect={isAuthentic}
@@ -98,7 +97,7 @@ export default StepAuth = ({
           { app.v3.vouchers &&
           <Pressable
             style={styles.voucherLayout}
-            onPress={() => isAuthentic && PagerUtil.toSelectVoucher(chargeBoxId, connectorId)}>
+            onPress={() => isAuthentic && PagerUtil.toSelectVoucher(connectorInfo.chargeBoxId, connectorInfo.connectorId)}>
             <MaterialCommunityIcons
               name="ticket-percent"
               size={35}

+ 0 - 1
Strides-APP/app/pages/chargingV3/ChargingPage.js

@@ -471,7 +471,6 @@ export default class ChargingPageV4 extends Component {
             ? <StepAuth
                 status={this.state.connectorInfo?.status}
                 connectorInfo={this.state.connectorInfo}
-                chargeBoxId={this.state.stationInfo.chargeBoxId}
                 currentPayment={this.state.currentPayment}
                 onStartCharge={() => this.onStartCharge()}
                 selectedVoucher={this.state.selectedVoucher}

+ 1 - 2
Strides-APP/app/pages/chargingV3/StepAuth.js

@@ -18,7 +18,6 @@ export default StepAuth = ({
   status="",
   currentPayment,
   onStartCharge,
-  chargeBoxId,
   connectorInfo,
   selectedVoucher={},
   onPaymentMethodChanged
@@ -82,7 +81,7 @@ export default StepAuth = ({
                   style={styles.paymentView}
                   isSelect={isAuthentic}
                   payType={currentPayment}
-                  chargeBoxId={chargeBoxId}
+                  chargeBoxId={connectorInfo.chargeBoxId}
                   borderColor={textCancel}
                   onMethodChange={onPaymentMethodChanged}/>
               : <PaymentList