From ca727ec1f7b46dcb601baf947d651c7150f03308 Mon Sep 17 00:00:00 2001
From: zhangyibo95 <690096405@qq.com>
Date: Thu, 29 Oct 2026 16:28:03 +0800
Subject: [PATCH] =?UTF-8?q?update=EF=BC=9A=E4=BC=98=E5=8C=96wifi=E5=8F=8D?=
=?UTF-8?q?=E9=A6=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/device/ota-wifi.vue | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/src/pages/device/ota-wifi.vue b/src/pages/device/ota-wifi.vue
index 213a003..45a1d54 100644
--- a/src/pages/device/ota-wifi.vue
+++ b/src/pages/device/ota-wifi.vue
@@ -39,6 +39,7 @@ const connectMode = ref("secure"); // secure | open | manual
const connectError = ref("");
const connectStatusText = ref("");
const isSubmittingWifi = ref(false);
+const wifiSuccessVisible = ref(false);
const keyboardHeight = ref(0);
// 控制密码输入框是否显示明文
const showPassword = ref(false);
@@ -368,6 +369,8 @@ const submitDeviceWifiConfig = async ({ ssid, password }) => {
void refreshConnectedWifiName();
if (fromFirmwareUpdate.value) {
openFirmwareCountdown();
+ } else {
+ wifiSuccessVisible.value = true;
}
} catch (err) {
if (requestId === wifiConnectRequestId) {
@@ -382,6 +385,13 @@ const submitDeviceWifiConfig = async ({ ssid, password }) => {
}
};
+// 普通配网成功后,等待用户确认再返回上一页。
+const confirmWifiSuccess = () => {
+ if (!wifiSuccessVisible.value) return;
+ wifiSuccessVisible.value = false;
+ uni.navigateBack();
+};
+
// 校验用户输入并提交 WiFi 配置,不再把手机连接结果当作设备连接成功。
const joinNetwork = () => {
if (joinDisabled.value) return;
@@ -755,6 +765,14 @@ onUnmounted(() => {
+
+