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

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
+5 -3
View File
@@ -253,7 +253,8 @@
var api = window.GenealogyApi && window.GenealogyApi.defaultClient;
var redirect = function () {
clearCurrentGenealogyContext();
window.location.href = targetUrl || 'index.html';
if (window.PublicNavigation) window.PublicNavigation.clearUser();
window.NavigationUtil.open(targetUrl || 'index.html');
};
if (!api || !api.logout) {
@@ -310,7 +311,7 @@
content: $item.attr('data-layer-confirm') || '确定继续吗?',
confirmText: $item.attr('data-confirm-text') || '确定',
onConfirm: function () {
if (href && href !== '#') window.location.href = href;
if (href && href !== '#') window.NavigationUtil.open(href);
}
});
});
@@ -489,6 +490,7 @@
var $sidebar = $('.module-nav').first();
var $header = $('.site-header').first();
var headerItems = [
{ label: '首页', href: 'index.html' },
{ label: '我的家谱', href: 'profile-families.html' },
{ label: '家族管理', href: 'profile-family-admin.html', context: true },
{ label: '内容发布', href: 'profile-content.html', context: true },
@@ -498,7 +500,7 @@
var currentSection = getHeaderSection(currentPage);
if ($header.length) {
$header.find('.brand').first().attr('href', 'profile.html').html(
$header.find('.brand').first().attr('href', 'index.html').html(
'<img class="brand-logo brand-logo-mark" src="public/images/logo-mark.png" alt="" />' +
'<span class="brand-text">个人中心</span>'
);