1.1需求完成

This commit is contained in:
2025-07-04 13:46:11 +08:00
parent 62260e8483
commit c6f765f858
52 changed files with 1993 additions and 1012 deletions

View File

@@ -53,7 +53,7 @@
<router-view v-if="key !== '/zh' && key !== '/en' &&key !== '/zh/login' && key !== '/en/login' && key !== '/zh/register' && key !== '/en/register'" :key="key" />
<div v-else style="color: #333;font-size: 16px;text-align: center;line-height: 100vh;">
选择左侧导航栏查看页面
{{ $t("backendSystem.leftNavigation") }}
</div>
</el-main>
@@ -118,6 +118,9 @@ export default {
}
this.userEmail = userEmail;
});
//网络变化
window.addEventListener("online", this.handleNetworkChange);
},
methods: {
async fetchSignOut() {
@@ -178,7 +181,19 @@ export default {
this.$message.error(this.$t("common.langChangeFailed"));
}
},
// 处理网络状态变化
handleNetworkChange() {
if (navigator.onLine) {
// === 强制重置状态,兜底 ===
location.reload(); // 重新加载当前页面
}
},
},
beforeDestroy() {
window.removeEventListener("online", this.handleNetworkChange);
},
};
</script>