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 1/2] =?UTF-8?q?update=EF=BC=9A=E4=BC=98=E5=8C=96wifi?=
=?UTF-8?q?=E5=8F=8D=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(() => {
+
+
Date: Thu, 29 Oct 2026 16:49:08 +0800
Subject: [PATCH 2/2] =?UTF-8?q?update=EF=BC=9A=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/device/ota-wifi.vue | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/pages/device/ota-wifi.vue b/src/pages/device/ota-wifi.vue
index 45a1d54..77b5e27 100644
--- a/src/pages/device/ota-wifi.vue
+++ b/src/pages/device/ota-wifi.vue
@@ -365,11 +365,12 @@ const submitDeviceWifiConfig = async ({ ssid, password }) => {
secure: connectMode.value === "secure" || !!password,
};
connectError.value = "";
- currentState.value = STATES.CONNECTED;
void refreshConnectedWifiName();
if (fromFirmwareUpdate.value) {
+ currentState.value = STATES.CONNECTED;
openFirmwareCountdown();
} else {
+ // 保留配网输入界面,避免成功提示出现前先露出 WiFi 列表。
wifiSuccessVisible.value = true;
}
} catch (err) {
@@ -385,11 +386,11 @@ const submitDeviceWifiConfig = async ({ ssid, password }) => {
}
};
-// 普通配网成功后,等待用户确认再返回上一页。
+// 普通配网成功后,确认并收起输入界面,停留在当前 WiFi 页面。
const confirmWifiSuccess = () => {
if (!wifiSuccessVisible.value) return;
wifiSuccessVisible.value = false;
- uni.navigateBack();
+ currentState.value = STATES.CONNECTED;
};
// 校验用户输入并提交 WiFi 配置,不再把手机连接结果当作设备连接成功。