5 Commits
Author SHA1 Message Date
zhangyi 9699f1356f Merge branch 'feat-shebei' into test 2026-10-29 16:49:26 +08:00
zhangyi 899a222e3f update:优化 2026-10-29 16:49:08 +08:00
zhangyi ca727ec1f7 update:优化wifi反馈 2026-10-29 16:28:03 +08:00
zhangyi aa33a931b1 Merge branch 'feat-shebei' into test 2026-10-29 16:12:32 +08:00
zhangyi bac84536c7 update:优化样式 2026-10-29 16:11:58 +08:00
2 changed files with 22 additions and 3 deletions
+2 -2
View File
@@ -874,8 +874,8 @@ onShow(async () => {
.product-link {
position: fixed;
bottom: 104rpx;
bottom: calc(env(safe-area-inset-bottom) + 104rpx);
bottom: 208rpx;
/* bottom: calc(env(safe-area-inset-bottom) + 104rpx); */
left: 0;
z-index: 2;
width: 100%;
+20 -1
View File
@@ -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);
@@ -364,10 +365,13 @@ 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) {
if (requestId === wifiConnectRequestId) {
@@ -382,6 +386,13 @@ const submitDeviceWifiConfig = async ({ ssid, password }) => {
}
};
// 普通配网成功后,确认并收起输入界面,停留在当前 WiFi 页面。
const confirmWifiSuccess = () => {
if (!wifiSuccessVisible.value) return;
wifiSuccessVisible.value = false;
currentState.value = STATES.CONNECTED;
};
// 校验用户输入并提交 WiFi 配置,不再把手机连接结果当作设备连接成功。
const joinNetwork = () => {
if (joinDisabled.value) return;
@@ -755,6 +766,14 @@ onUnmounted(() => {
</view>
</view>
<ModalDialog
:show="wifiSuccessVisible"
content="WIFI连接成功"
confirmText="确定"
:showCancel="false"
:onConfirm="confirmWifiSuccess"
></ModalDialog>
<ModalDialog
:show="countdownVisible"
title="WiFi连接成功"