修改页面,完成单页模式新增首页返回上一页按钮

This commit is contained in:
2026-08-31 14:48:32 +08:00
parent aaed0584b1
commit 15b301b358
363 changed files with 10895 additions and 213 deletions
+3 -9
View File
@@ -91,13 +91,7 @@
function redirectToLogin(api) {
if (api && api.clearToken) api.clearToken();
if (!root.location) return;
if (typeof root.location.replace === 'function') {
root.location.replace('login.html');
return;
}
root.location.href = 'login.html';
root.NavigationUtil.open('login.html');
}
function redirectUnauthorized(api, error) {
@@ -417,7 +411,7 @@
setStatus(form, 'loading', '正在提交注销申请…');
await api.deactivateAccount(buildDeactivateBody(values));
showMessage('账号已提交注销');
root.location.href = 'index.html';
root.NavigationUtil.open('index.html');
} catch (error) {
if (redirectUnauthorized(api, error)) return;
setStatus(form, 'error', '注销失败,请稍后重试。');
@@ -437,7 +431,7 @@
} catch (error) {
// 退出请求失败时客户端仍会清理本地令牌,页面必须离开受保护区域。
} finally {
root.location.href = 'index.html';
root.NavigationUtil.open('index.html');
}
}