|
|
@@ -6,7 +6,7 @@
|
|
|
<view class="tool-desc" v-else>-</view>
|
|
|
</view>
|
|
|
<header-view
|
|
|
- title="Insert Charging Cable"
|
|
|
+ :info="connectorInfo"
|
|
|
:status="connectorInfo.status"
|
|
|
:isLoading="isLoading"
|
|
|
:password="password"/>
|
|
|
@@ -311,6 +311,42 @@ export default {
|
|
|
this.showPin = true;
|
|
|
return;
|
|
|
}
|
|
|
+ if (this.connectorInfo.alertContent) {
|
|
|
+ uni.showModal({
|
|
|
+ title: "Note",
|
|
|
+ content: this.connectorInfo.alertContent,
|
|
|
+ showCancel: true,
|
|
|
+ success: rs => {
|
|
|
+ if (rs.confirm) {
|
|
|
+ this.requestPayment()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else if (this.connectorInfo.preAuthAmount) {
|
|
|
+ uni.showModal({
|
|
|
+ title: "Pre-Authorization Payment",
|
|
|
+ content: this.connectorInfo.preAuthAmount + " will be held for Pre-Authorization.\nUpon charging completion, this amount will be refunded and actual usage will be charged.",
|
|
|
+ showCancel: true,
|
|
|
+ success: rs => {
|
|
|
+ if (rs.confirm) {
|
|
|
+ this.requestPayment()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.showModal({
|
|
|
+ title: "Pre-Authorization Payment",
|
|
|
+ content: "S$50 will be held for Pre-Authorization.\nUpon charging completion, this amount will be refunded and actual usage will be charged.",
|
|
|
+ showCancel: true,
|
|
|
+ success: rs => {
|
|
|
+ if (rs.confirm) {
|
|
|
+ this.requestPayment()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ requestPayment() {
|
|
|
uni.showLoading({
|
|
|
title: "Waiting..."
|
|
|
})
|