框架hash禁止访问外部链接

This commit is contained in:
邹景立 2021-09-17 10:13:15 +08:00
parent c4b2163b9f
commit 4469f7f602

View File

@ -401,6 +401,7 @@ $(function () {
window.onhashchange = function () {
var hash = location.hash || '', node;
if (hash.length < 1) return $('[data-menu-node]:first').trigger('click');
if (/^#(https?:)?\/\//.test(hash)) return $.msg.tips('禁止访问外部链接!');
// $.msg.page.show(),$.form.load(hash, {}, 'get', $.msg.page.hide, true),that.syncOpenStatus(2);
$.form.load(hash, {}, 'get', false, !$.msg.page.stat()), that.syncOpenStatus(2);
/*! 菜单选择切换 */