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

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
+2 -7
View File
@@ -340,12 +340,7 @@
function redirectUnauthorized(api, error) {
if (!shouldRedirectToLogin(api, error)) return false;
if (api && api.clearToken) api.clearToken();
if (!root.location) return true;
if (typeof root.location.replace === 'function') {
root.location.replace('login.html');
return true;
}
root.location.href = 'login.html';
root.NavigationUtil.open('login.html');
return true;
}
@@ -655,7 +650,7 @@
if (!savedId) throw new Error('保存响应缺少 recordId');
verifiedDetail = await api.growthRecordDetail(genealogyId, savedId);
if (!matchesSavedRecord(verifiedDetail, savedId)) throw new Error('保存后重读未返回同一条成长记录');
if (root.location) root.location.href = buildListUrl(genealogyId, savedId);
root.NavigationUtil.open(buildListUrl(genealogyId, savedId));
} catch (error) {
if (redirectUnauthorized(api, error)) return;
setFormStatus(