function addTab(e){tab.tabAdd(e)}function donation(){layer.tab({area:["260px","367px"],tab:[{title:"微信",content:"<div style='padding:30px;overflow:hidden;background:#d2d0d0;'><img src='images/WeChat.png'></div>"},{title:"支付宝",content:"<div style='padding:30px;overflow:hidden;background:#d2d0d0;'><img src='images/Alipay.png'></div>"}]})}var $,tab,dataStr,layer;layui.config({base:"js/"}).extend({bodyTab:"bodyTab"}),layui.use(["bodyTab","form","element","layer","jquery"],function(){function e(e){n.getJSON(tab.tabConfig.url,function(a){"contentManagement"==e?(dataStr=a.contentManagement,tab.render()):"memberCenter"==e?(dataStr=a.memberCenter,tab.render()):"systemeSttings"==e?(dataStr=a.systemeSttings,tab.render()):"seraphApi"==e&&(dataStr=a.seraphApi,tab.render())})}layui.form;var a=layui.element,n=layui.$,t=void 0===parent.layer?layui.layer:top.layer;if(tab=layui.bodyTab({openTabNum:"50",url:"js/navs.json"}),n(function(){n.ajax({url:"ajax.php?act=systemParameter",dataType:"json",success:function(e){"0"==e.code?n(".userName").text(e.data.user):window.location.href="index.html"}})}),n(".topLevelMenus li,.mobileTopLevelMenus dd").click(function(){"0"!=n(this).parents(".mobileTopLevelMenus").length?n(".topLevelMenus li").eq(n(this).index()).addClass("layui-this").siblings().removeClass("layui-this"):n(".mobileTopLevelMenus dd").eq(n(this).index()).addClass("layui-this").siblings().removeClass("layui-this"),n(".layui-layout-admin").removeClass("showMenu"),n("body").addClass("site-mobile"),e(n(this).data("menu")),tab.tabMove()}),n(".hideMenu").click(function(){if(n(".topLevelMenus li.layui-this a").data("url"))return t.msg("此栏目状态下左侧菜单不可展开"),!1;n(".layui-layout-admin").toggleClass("showMenu"),tab.tabMove()}),e("contentManagement"),n(".site-tree-mobile").on("click",function(){n("body").addClass("site-mobile")}),n(".site-mobile-shade").on("click",function(){n("body").removeClass("site-mobile")}),n("body").on("click",".layui-nav .layui-nav-item a:not('.mobileTopLevelMenus .layui-nav-item a')",function(){0==n(this).siblings().length&&(addTab(n(this)),n("body").removeClass("site-mobile")),n(this).parent("li").siblings().removeClass("layui-nav-itemed")}),n(".clearCache").click(function(){window.sessionStorage.clear(),window.localStorage.clear();var e=t.msg("清除缓存中，请稍候",{icon:16,time:!1,shade:.8});setTimeout(function(){t.close(e),t.msg("缓存清除成功！")},1e3)}),"true"==cacheStr){if(null!=window.sessionStorage.getItem("menu")){menu=JSON.parse(window.sessionStorage.getItem("menu")),curmenu=window.sessionStorage.getItem("curmenu");for(var i="",s=0;s<menu.length;s++)i="",menu[s].icon&&("icon"==menu[s].icon.split("-")[0]?i+='<i class="seraph '+menu[s].icon+'"></i>':i+='<i class="layui-icon">'+menu[s].icon+"</i>"),i+="<cite>"+menu[s].title+"</cite>",i+='<i class="layui-icon layui-unselect layui-tab-close" data-id="'+menu[s].layId+'">&#x1006;</i>',a.tabAdd("bodyTab",{title:i,content:"<iframe src='"+menu[s].href+"' data-id='"+menu[s].layId+"'></frame>",id:menu[s].layId}),"undefined"!=curmenu?""==curmenu||"null"==curmenu?a.tabChange("bodyTab",""):JSON.parse(curmenu).title==menu[s].title&&a.tabChange("bodyTab",menu[s].layId):a.tabChange("bodyTab",menu[menu.length-1].layId);tab.tabMove()}}else window.sessionStorage.removeItem("menu"),window.sessionStorage.removeItem("curmenu")});