Ver Fonte

fix: 启动充电时存在进行中的订单直接进入充电中页面,移除易误读的提示弹窗

Co-Authored-By: Claude Code <noreply@anthropic.com>
skyline há 1 dia atrás
pai
commit
ed4fc55a96
1 ficheiros alterados com 5 adições e 14 exclusões
  1. 5 14
      charge-front/src/pages-charge/ordering/ordering.vue

+ 5 - 14
charge-front/src/pages-charge/ordering/ordering.vue

@@ -589,21 +589,12 @@ const onImgLoad = () => {
         return;
       }
       if (res && res.isStarted) {
-        if (options.value && options.value.connectorId === res.connectorId) {
-          fetchStatus(res);
-          return;
+        // 已有充电中的订单,直接进入充电中页面
+        if (options.value && options.value.connectorId !== res.connectorId) {
+          // 同步为当前充电订单的充电桩,保证停止充电等操作正确
+          options.value = { ...options.value, connectorId: res.connectorId };
         }
-        // 当前充电中
-        uni.showModal({
-          title: "温馨提示",
-          content: "当前有正在充电中的订单",
-          showCancel: false,
-          confirmText: "查看订单",
-          confirmColor: "#2d9e95",
-          success: () => {
-            fetchStatus(res);
-          },
-        });
+        fetchStatus(res);
       } else {
         reLaunch();
       }