text: /** layuiAdmin.std-v1.2.0 LPPL License By http://www.layui.com/admin/ */
   ;layui.define(["laytpl","layer"],function(e){var u=layui.jquery,c=layui.laytpl,r=layui.layer,t=layui.setter,y=(layui.device(),layui.hint()),p=function(e){return new a(e)},n="LAY_app_body",a=function(e){this.id=e,this.container=u("#"+(e||n))};p.loading=function(e){e.append(this.elemLoad=u('<i class="layui-anim layui-anim-rotate layui-anim-loop layui-icon layui-icon-loading layadmin-loading"></i>'))},p.removeLoad=function(){this.elemLoad&&this.elemLoad.remove()},p.exit=function(e){layui.data(t.tableName,{key:t.request.tokenName,remove:!0}),e&&e()},p.req=function(a){var r=a.success,e=(a.error,t.request),o=t.response,i=function(){return t.debug?"<br><cite>URL：</cite>"+a.url:""};return a.data=a.data||{},a.headers=a.headers||{},e.tokenName&&(a.data[e.tokenName]=e.tokenName in a.data?a.data[e.tokenName]:layui.data(t.tableName)[e.tokenName]||"",a.headers[e.tokenName]=e.tokenName in a.headers?a.headers[e.tokenName]:layui.data(t.tableName)[e.tokenName]||""),delete a.success,delete a.error,u.ajax(u.extend({type:"get",dataType:"json",success:function(e){var t=o.statusCode;if(e[o.statusName]==t.ok)"function"==typeof a.done&&a.done(e);else if(e[o.statusName]==t.logout)p.exit();else{var n=["<cite>Error：</cite> "+(e[o.msgName]||"返回状态码异常"),i()].join("");p.error(n)}"function"==typeof r&&r(e)},error:function(e,t){var n=["请求异常，请重试<br><cite>错误信息：</cite>"+t,i()].join("");p.error(n),"function"==typeof n&&n(res)}},a))},p.popup=function(e){var a=e.success,t=e.skin;return delete e.success,delete e.skin,r.open(u.extend({type:1,title:"提示",content:"",id:"LAY-system-view-popup",skin:"layui-layer-admin"+(t?" "+t:""),shadeClose:!0,closeBtn:!1,success:function(e,t){var n=u('<i class="layui-icon" close>&#x1006;</i>');e.append(n),n.on("click",function(){r.close(t)}),"function"==typeof a&&a.apply(this,arguments)}},e))},p.error=function(e,t){return p.popup(u.extend({content:e,maxWidth:300,offset:"t",anim:6,id:"LAY_adminError"},t))},a.prototype.render=function(e,a){var r=this;layui.router();return e=t.views+e+t.engine,u("#"+n).children(".layadmin-loading").remove(),p.loading(r.container),u.ajax({url:e,type:"get",dataType:"html",data:{v:layui.cache.version},success:function(e){var t=u(e="<div>"+e+"</div>").find("title"),n={title:t.text()||(e.match(/\<title\>([\s\S]*)\<\/title>/)||[])[1],body:e};t.remove(),r.params=a||{},r.then&&(r.then(n),delete r.then),r.parse(e),p.removeLoad(),r.done&&(r.done(n),delete r.done)},error:function(e){if(p.removeLoad(),r.render.isError)return p.error("请求视图文件异常，状态："+e.status);404===e.status?r.render("template/tips/404"):r.render("template/tips/error"),r.render.isError=!0}}),r},a.prototype.parse=function(e,t,n){var a=this,r="object"==typeof e,o=r?e:u(e),i=r?e:o.find("*[template]"),s=function(t){var e=c(t.dataElem.html());t.dataElem.after(e.render(u.extend({params:d.params},t.res))),"function"==typeof n&&n();try{t.done&&new Function("d",t.done)(t.res)}catch(e){console.error(t.dataElem[0],"\n存在错误回调脚本\n\n",e)}},d=layui.router();o.find("title").remove(),a.container[t?"after":"html"](o.children()),d.params=a.params||{};for(var l=i.length;0<l;l--)!function(){var t=i.eq(l-1),n=t.attr("lay-done")||t.attr("lay-then"),e=c(t.attr("lay-url")||"").render(d),a=c(t.attr("lay-data")||"").render(d),r=c(t.attr("lay-headers")||"").render(d);try{a=new Function("return "+a+";")()}catch(e){y.error("lay-data: "+e.message),a={}}try{r=new Function("return "+r+";")()}catch(e){y.error("lay-headers: "+e.message),r=r||{}}e?p.req({type:t.attr("lay-type")||"get",url:e,data:a,dataType:"json",headers:r,success:function(e){s({dataElem:t,res:e,done:n})}}):s({dataElem:t,done:n})}();return a},a.prototype.autoRender=function(e,t){var a=this;u(e||"body").find("*[template]").each(function(e,t){var n=u(this);a.container=n,a.parse(n,"refresh")})},a.prototype.send=function(e,t){var n=c(e||this.container.html()).render(t||{});return this.container.html(n),this},a.prototype.refresh=function(e){var t=this,n=t.container.next().attr("lay-templateid");return t.id!=n||t.parse(t.container,"refresh",function(){t.container.siblings('[lay-templateid="'+t.id+'"]:last').remove(),"function"==typeof e&&e()}),t},a.prototype.then=function(e){return this.then=e,this},a.prototype.done=function(e){return this.done=e,this},e("view",p)});