|
|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<view class="container">
|
|
|
- <image class="bg" src="../static/charge-ordering-bg.png" mode="widthFix" />
|
|
|
+ <image class="bg" src="/pages-charge/static/charge-ordering-bg.png" mode="widthFix" />
|
|
|
<view class="body">
|
|
|
<view class="iphonex-placeholder"></view>
|
|
|
<view
|
|
|
@@ -11,7 +11,7 @@
|
|
|
>
|
|
|
<image
|
|
|
:class="['border', `${step <= 2 ? 'border-animation' : ''}`]"
|
|
|
- src="../static/charge-ordering-border.png"
|
|
|
+ src="/pages-charge/static/charge-ordering-border.png"
|
|
|
@load="onImgLoad"
|
|
|
/>
|
|
|
<view class="timer flex-column flex-center">
|
|
|
@@ -25,11 +25,11 @@
|
|
|
<view class="fs-26">充电启动中</view>
|
|
|
</block>
|
|
|
<block v-if="step === 2">
|
|
|
- <image class="icon" src="../static/charge-ordering-icon.png" />
|
|
|
+ <image class="icon" src="/pages-charge/static/charge-ordering-icon.png" />
|
|
|
<view class="fs-26 mt-10">充电中...</view>
|
|
|
</block>
|
|
|
<block v-if="step === 3">
|
|
|
- <image class="icon" src="../static/charge-ordering-finish.png" />
|
|
|
+ <image class="icon" src="/pages-charge/static/charge-ordering-finish.png" />
|
|
|
<view class="fs-26 mt-10">充电结束</view>
|
|
|
</block>
|
|
|
</view>
|
|
|
@@ -342,32 +342,33 @@ const fetchStatus = (data?: any) => {
|
|
|
});
|
|
|
};
|
|
|
const onImgLoad = () => {
|
|
|
- fetchChargeStatus()
|
|
|
- .then((res) => {
|
|
|
- if ([1, 2].includes(res.chargeStatus)) {
|
|
|
- if (options.value && options.value.sn === res.connectorId) {
|
|
|
- fetchStatus(res);
|
|
|
- return;
|
|
|
- }
|
|
|
- // 当前充电中
|
|
|
- uni.showModal({
|
|
|
- title: "温馨提示",
|
|
|
- content: "当前有正在充电中的订单",
|
|
|
- showCancel: false,
|
|
|
- confirmText: "查看订单",
|
|
|
- confirmColor: "#347DFF",
|
|
|
- success: () => {
|
|
|
- fetchStatus(res);
|
|
|
- },
|
|
|
- });
|
|
|
- } else {
|
|
|
- start();
|
|
|
- }
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
- console.log(err);
|
|
|
- start();
|
|
|
- });
|
|
|
+ start();
|
|
|
+ // fetchChargeStatus()
|
|
|
+ // .then((res) => {
|
|
|
+ // if ([1, 2].includes(res.chargeStatus)) {
|
|
|
+ // if (options.value && options.value.sn === res.connectorId) {
|
|
|
+ // fetchStatus(res);
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // // 当前充电中
|
|
|
+ // uni.showModal({
|
|
|
+ // title: "温馨提示",
|
|
|
+ // content: "当前有正在充电中的订单",
|
|
|
+ // showCancel: false,
|
|
|
+ // confirmText: "查看订单",
|
|
|
+ // confirmColor: "#347DFF",
|
|
|
+ // success: () => {
|
|
|
+ // fetchStatus(res);
|
|
|
+ // },
|
|
|
+ // });
|
|
|
+ // } else {
|
|
|
+ // start();
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // .catch((err) => {
|
|
|
+ // console.log(err);
|
|
|
+ // start();
|
|
|
+ // });
|
|
|
};
|
|
|
|
|
|
onLoad((_options: any) => {
|