|
|
@ -9,6 +9,9 @@ layui.define(["element", "layer", "jquery"], function (exports) { |
|
|
layer = layui.layer, |
|
|
layer = layui.layer, |
|
|
$ = layui.$; |
|
|
$ = layui.$; |
|
|
|
|
|
|
|
|
|
|
|
// 用于储存移动端底部导航映射
|
|
|
|
|
|
let mobileFooterHash = {'/userAuthorityMenus':"功能","/message":"消息","/userInfo":"我的"}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var miniTab = { |
|
|
var miniTab = { |
|
|
|
|
|
|
|
|
@ -323,7 +326,6 @@ layui.define(["element", "layer", "jquery"], function (exports) { |
|
|
* 在iframe子菜单上打开新窗口 |
|
|
* 在iframe子菜单上打开新窗口 |
|
|
*/ |
|
|
*/ |
|
|
$('body').on('click', '[layuimini-content-href]', function () { |
|
|
$('body').on('click', '[layuimini-content-href]', function () { |
|
|
|
|
|
|
|
|
var loading = parent.layer.load(0, {shade: false, time: 2 * 1000}); |
|
|
var loading = parent.layer.load(0, {shade: false, time: 2 * 1000}); |
|
|
var tabId = $(this).attr('layuimini-content-href'), |
|
|
var tabId = $(this).attr('layuimini-content-href'), |
|
|
href = $(this).attr('layuimini-content-href'), |
|
|
href = $(this).attr('layuimini-content-href'), |
|
|
@ -332,7 +334,7 @@ layui.define(["element", "layer", "jquery"], function (exports) { |
|
|
let footer = $(this).attr("footer"); |
|
|
let footer = $(this).attr("footer"); |
|
|
if (footer === "1" || footer === 1) { |
|
|
if (footer === "1" || footer === 1) { |
|
|
miniTab.renderHome({"href": href, "title": title}) |
|
|
miniTab.renderHome({"href": href, "title": title}) |
|
|
} |
|
|
} else { |
|
|
if (target === '_blank') { |
|
|
if (target === '_blank') { |
|
|
parent.layer.close(loading); |
|
|
parent.layer.close(loading); |
|
|
window.open(href, "_blank"); |
|
|
window.open(href, "_blank"); |
|
|
@ -349,6 +351,8 @@ layui.define(["element", "layer", "jquery"], function (exports) { |
|
|
maxTabNum: options.maxTabNum, |
|
|
maxTabNum: options.maxTabNum, |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
parent.layui.element.tabChange('layuiminiTab', tabId); |
|
|
parent.layui.element.tabChange('layuiminiTab', tabId); |
|
|
parent.layer.close(loading); |
|
|
parent.layer.close(loading); |
|
|
}); |
|
|
}); |
|
|
@ -492,9 +496,11 @@ layui.define(["element", "layer", "jquery"], function (exports) { |
|
|
if (!options.urlHashLocation) return false; |
|
|
if (!options.urlHashLocation) return false; |
|
|
var tabId = location.hash.replace(/^#\//, ''); |
|
|
var tabId = location.hash.replace(/^#\//, ''); |
|
|
if (tabId === null || tabId === undefined || tabId === '') return false; |
|
|
if (tabId === null || tabId === undefined || tabId === '') return false; |
|
|
|
|
|
// 判断是否为首页或者底部导航栏页面
|
|
|
// 判断是否为首页
|
|
|
if (tabId === options.homeInfo.href || Object.keys(mobileFooterHash).indexOf(tabId) !== -1) { |
|
|
if (tabId === options.homeInfo.href) return false; |
|
|
miniTab.renderHome({"href":tabId,"title":mobileFooterHash[tabId]}); |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 判断是否为右侧菜单
|
|
|
// 判断是否为右侧菜单
|
|
|
var menu = miniTab.searchMenu(tabId, options.menuList); |
|
|
var menu = miniTab.searchMenu(tabId, options.menuList); |
|
|
|