现在有的接口对接测试完成
This commit is contained in:
@@ -147,14 +147,21 @@
|
||||
return parts[0] + '?' + params.toString() + hash;
|
||||
}
|
||||
|
||||
function getGenealogyEntryUrl(href) {
|
||||
var value = String(href || '');
|
||||
|
||||
if (!value || value.charAt(0) === '#' || /^(?:https?:|mailto:|tel:)/i.test(value)) return value;
|
||||
if (value.indexOf('profile-families.html') === 0) return value;
|
||||
return 'profile-families.html?next=' + encodeURIComponent(value.split('?')[0]);
|
||||
}
|
||||
|
||||
function syncGenealogyContextLinks() {
|
||||
var genealogyId = getGenealogyId();
|
||||
|
||||
if (!genealogyId) return;
|
||||
$('[data-genealogy-context-link]').each(function () {
|
||||
var $link = $(this);
|
||||
|
||||
$link.attr('href', withGenealogyId($link.attr('href'), genealogyId));
|
||||
$link.attr('href', genealogyId ? withGenealogyId($link.attr('href'), genealogyId) : getGenealogyEntryUrl($link.attr('href')));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -272,6 +279,7 @@
|
||||
initLayui: initLayui,
|
||||
getGenealogyId: getGenealogyId,
|
||||
withGenealogyId: withGenealogyId,
|
||||
getGenealogyEntryUrl: getGenealogyEntryUrl,
|
||||
syncGenealogyContextLinks: syncGenealogyContextLinks
|
||||
};
|
||||
})(window, window.jQuery || (window.layui && window.layui.$));
|
||||
|
||||
Reference in New Issue
Block a user