修改页面,完成单页模式新增首页返回上一页按钮
This commit is contained in:
@@ -240,9 +240,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');
|
||||
else root.location.href = 'login.html';
|
||||
root.NavigationUtil.open('login.html');
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -532,7 +530,7 @@
|
||||
setStatus('[data-member-action-status]', '正在退出当前家谱…', 'loading');
|
||||
try {
|
||||
await api.leaveGenealogy(genealogyId);
|
||||
if (root.location) root.location.href = 'profile-families.html';
|
||||
root.NavigationUtil.open('profile-families.html');
|
||||
} catch (error) {
|
||||
if (redirectUnauthorized(api, error)) return;
|
||||
setStatus('[data-member-action-status]', isForbidden(error) ? '当前账号无权退出该家谱。' : (error.message || '退出家谱失败'), isForbidden(error) ? 'forbidden' : 'error');
|
||||
|
||||
Reference in New Issue
Block a user