You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
12 KiB
Plaintext

11 months ago
/** layuiAdmin.std-v1.4.0 LPPL License By https://www.layui.com/admin/ */
;layui.define("view",function(e){var a=layui.jquery,t=layui.laytpl,i=layui.element,n=layui.setter,l=layui.view,s=layui.device(),r=a(window),o=a("body"),u=a("#"+n.container),d="layui-show",c="layui-hide",y="layui-this",f="layui-disabled",m="#LAY_app_body",h="LAY_app_flexible",p="layadmin-layout-tabs",v="layadmin-side-spread-sm",b="layadmin-tabsbody-item",g="layui-icon-shrink-right",x="layui-icon-spread-left",C="layadmin-side-shrink",k="LAY-system-side-menu",P={v:"1.4.0 std",req:l.req,exit:l.exit,escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#39;").replace(/"/g,"&quot;")},on:function(e,a){return layui.onevent.call(this,n.MOD_NAME,e,a)},sendAuthCode:function(e){e=a.extend({seconds:60,elemPhone:"#LAY_phone",elemVercode:"#LAY_vercode"},e);var t,i=e.seconds,n=a(e.elem),l=function(a){i--,i<0?(n.removeClass(f).html("获取验证码"),i=e.seconds,clearInterval(t)):n.addClass(f).html(i+"秒后重获"),a||(t=setInterval(function(){l(!0)},1e3))};e.elemPhone=a(e.elemPhone),e.elemVercode=a(e.elemVercode),n.on("click",function(){var t=e.elemPhone,n=t.val();if(i===e.seconds&&!a(this).hasClass(f)){if(!/^1\d{10}$/.test(n))return t.focus(),layer.msg("请输入正确的手机号");if("object"==typeof e.ajax){var s=e.ajax.success;delete e.ajax.success}P.req(a.extend(!0,{url:"/auth/code",type:"get",data:{phone:n},success:function(a){layer.msg("验证码已发送至你的手机,请注意查收",{icon:1,shade:0}),e.elemVercode.focus(),l(),s&&s(a)}},e.ajax))}})},screen:function(){var e=r.width();return e>1200?3:e>992?2:e>768?1:0},sideFlexible:function(e){var t=u,i=a("#"+h),l=P.screen();"spread"===e?(i.removeClass(x).addClass(g),l<2?t.addClass(v):t.removeClass(v),t.removeClass(C)):(i.removeClass(g).addClass(x),l<2?t.removeClass(C):t.addClass(C),t.removeClass(v)),layui.event.call(this,n.MOD_NAME,"side({*})",{status:e})},popup:l.popup,popupRight:function(e){return P.popup.index=layer.open(a.extend({type:1,id:"LAY_adminPopupR",anim:-1,title:!1,closeBtn:!1,offset:"r",shade:.1,shadeClose:!0,skin:"layui-anim layui-anim-rl layui-layer-adminRight",area:"300px"},e))},theme:function(e){var i=(n.theme,layui.data(n.tableName)),l="LAY_layadmin_theme",s=document.createElement("style"),r=t([".layui-side-menu,",".layadmin-pagetabs .layui-tab-title li:after,",".layadmin-pagetabs .layui-tab-title li.layui-this:after,",".layui-layer-admin .layui-layer-title,",".layadmin-side-shrink .layui-side-menu .layui-nav>.layui-nav-item>.layui-nav-child","{background-color:{{d.color.main}} !important;}",".layui-nav-tree .layui-this,",".layui-nav-tree .layui-this>a,",".layui-nav-tree .layui-nav-child dd.layui-this,",".layui-nav-tree .layui-nav-child dd.layui-this a","{background-color:{{d.color.selected}} !important;}",".layui-layout-admin .layui-logo{background-color:{{d.color.logo || d.color.main}} !important;}","{{# if(d.color.header){ }}",".layui-layout-admin .layui-header{background-color:{{ d.color.header }};}",".layui-layout-admin .layui-header a,",".layui-layout-admin .layui-header a cite{color: #f8f8f8;}",".layui-layout-admin .layui-header a:hover{color: #fff;}",".layui-layout-admin .layui-header .layui-nav .layui-nav-more{border-top-color: #fbfbfb;}",".layui-layout-admin .layui-header .layui-nav .layui-nav-mored{border-color: transparent; border-bottom-color: #fbfbfb;}",".layui-layout-admin .layui-header .layui-nav .layui-this:after, .layui-layout-admin .layui-header .layui-nav-bar{background-color: #fff; background-color: rgba(255,255,255,.5);}",".layadmin-pagetabs .layui-tab-title li:after{display: none;}","{{# } }}"].join("")).render(e=a.extend({},i.theme,e)),u=document.getElementById(l);"styleSheet"in s?(s.setAttribute("type","text/css"),s.styleSheet.cssText=r):s.innerHTML=r,s.id=l,u&&o[0].removeChild(u),o[0].appendChild(s),o.attr("layadmin-themealias",e.color.alias),i.theme=i.theme||{},layui.each(e,function(e,a){i.theme[e]=a}),layui.data(n.tableName,{key:"theme",value:i.theme})},initTheme:function(e){var a=n.theme;e=e||0,a.color[e]&&(a.color[e].index=e,P.theme({color:a