fix: OTAwifi页面跳转逻辑优化

This commit is contained in:
2026-06-30 17:06:52 +08:00
parent 422a93dbe2
commit 40b94dbad8
+11 -11
View File
@@ -531,18 +531,18 @@ const handleWsFail = () => {
failUpdate();
};
// 处理更新完成返回,兼容首页 OTA 弹窗入口和设备页普通入口。
const handleDone = () => {
uni.navigateBack({
delta: 1,
success() {
const pages = getCurrentPages();
const prevPage = pages[pages.length - 2];
if (prevPage) {
prevPage.$vm.otaState = "update_success";
prevPage.$vm.otaVisible = true;
}
},
});
const pages = getCurrentPages();
const prevPage = pages[pages.length - 2];
const prevVm = prevPage?.$vm;
if (prevVm && "otaState" in prevVm && "otaVisible" in prevVm) {
prevVm.otaState = "update_success";
prevVm.otaVisible = true;
}
uni.navigateBack({ delta: 1 });
};
const handleRetry = () => {