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","element","layer","jquery"],function(){function e(e){t.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())})}var a=layui.element,t=layui.$,n=void 0===parent.layer?layui.layer:top.layer;if(tab=layui.bodyTab({openTabNum:"50",url:"js/navs.js"}),t(function(){t.ajax({url:"ajax.php?act=systemParameter",dataType:"json",success:function(e){1==e.code?t(".userName").text(e.data.user):window.location.href="./"}})}),t(".topLevelMenus li,.mobileTopLevelMenus dd").click(function(){"0"!=t(this).parents(".mobileTopLevelMenus").length?t(".topLevelMenus li").eq(t(this).index()).addClass("layui-this").siblings().removeClass("layui-this"):t(".mobileTopLevelMenus dd").eq(t(this).index()).addClass("layui-this").siblings().removeClass("layui-this"),t(".layui-layout-admin").removeClass("showMenu"),t("body").addClass("site-mobile"),e(t(this).data("menu")),tab.tabMove()}),t(".hideMenu").click(function(){if(t(".topLevelMenus li.layui-this a").data("url"))return n.msg("此栏目状态下左侧菜单不可展开"),!1;t(".layui-layout-admin").toggleClass("showMenu"),tab.tabMove()}),e("contentManagement"),t(".site-tree-mobile").on("click",function(){t("body").addClass("site-mobile")}),t(".site-mobile-shade").on("click",function(){t("body").removeClass("site-mobile")}),t("body").on("click",".layui-nav .layui-nav-item a:not('.mobileTopLevelMenus .layui-nav-item a')",function(){0==t(this).siblings().length&&(addTab(t(this)),t("body").removeClass("site-mobile")),t(this).parent("li").siblings().removeClass("layui-nav-itemed")}),t(".clearCache").click(function(){window.sessionStorage.clear(),window.localStorage.clear();var e=n.msg("清除缓存中，请稍候",{icon:16,time:!1,shade:.8});setTimeout(function(){n.close(e),n.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")});