/* 2020-9-22 15:23:19 | 版权所有 军懋国兴 */ function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(c){"use strict";function t(e){var t=this;t.index=++p.index,t.config=d.extend({},t.config,y.config,e),document.body?t.creat():setTimeout(function(){t.creat()},30)}var d,u,e,i,n=c.layui&&layui.define,y={getPath:(e=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,i=t.length-1,n=i;0'+(s?a.title[0]:a.title)+"":"";return a.zIndex=o,t([a.shade?'
':"",'
'+(e&&2!=a.type?"":l)+'
'+(0==a.type&&-1!==a.icon?'':"")+((1!=a.type||!e)&&a.content||"")+'
'+(i=r?'':"",a.closeBtn&&(i+=''),i)+""+(a.btn?function(){var e="";"string"==typeof a.btn&&(a.btn=[a.btn]);for(var t=0,i=a.btn.length;t'+a.btn[t]+"";return'
'+e+"
"}():"")+(a.resize?'':"")+"
"],l,d('
')),this},t.pt.creat=function(){var e,n=this,a=n.config,o=n.index,s="object"===_typeof(l=a.content),r=d("body");if(!a.id||!d("#"+a.id)[0]){switch("string"==typeof a.area&&(a.area="auto"===a.area?["",""]:[a.area,""]),a.shift&&(a.anim=a.shift),6==p.ie&&(a.fixed=!1),a.type){case 0:a.btn="btn"in a?a.btn:y.btn[0],p.closeAll("dialog");break;case 2:var l=a.content=s?a.content:[a.content||"http://layer.layui.com","auto"];a.content='';break;case 3:delete a.title,delete a.closeBtn,-1===a.icon&&a.icon,p.closeAll("loading");break;case 4:s||(a.content=[a.content,"body"]),a.follow=a.content[1],a.content=a.content[0]+'',delete a.title,a.tips="object"===_typeof(a.tips)?a.tips:[a.tips,!0],a.tipsMore||p.closeAll("tips")}n.vessel(s,function(e,t,i){r.append(e[0]),s?2==a.type||4==a.type?d("body").append(e[1]):l.parents("."+h[0])[0]||("object"===_typeof(l)&&(f=l.context,l.after('
')),d("body").append(l.data("display",l.css("display")).show().addClass("layui-layer-wrap").wrap(e[1]).parents("#"+h[0]+n.index)),d("#"+h[0]+o).find("."+h[5]).before(t)):r.append(e[1]),d(".layui-layer-move")[0]||r.append(y.moveElem=i),n.layero=d("#"+h[0]+o),a.scrollbar||h.html.css("overflow","hidden").attr("layer-full",o)}).auto(o),d("#layui-layer-shade"+n.index).css({"background-color":a.shade[1]||"#000",opacity:a.shade[0]||a.shade}),2==a.type&&6==p.ie&&n.layero.find("iframe").attr("src",l[0]),4==a.type?n.tips():n.offset(),a.fixed&&u.on("resize",function(){n.offset(),(/^\d+%$/.test(a.area[0])||/^\d+%$/.test(a.area[1]))&&n.auto(o),4==a.type&&n.tips()}),a.time<=0||setTimeout(function(){p.close(n.index)},a.time),n.move().callback(),h.anim[a.anim]&&(e="layer-anim "+h.anim[a.anim],n.layero.addClass(e).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){d(this).removeClass(e)})),a.isOutAnim&&n.layero.data("isOutAnim",!0)}},t.pt.auto=function(e){var t=this.config,i=d("#"+h[0]+e);""===t.area[0]&&0t.maxWidth&&i.width(t.maxWidth));function n(e){(e=i.find(e)).height(a[1]-o-s-2*(0|parseFloat(e.css("padding-top"))))}var a=[i.innerWidth(),i.innerHeight()],o=i.find(h[1]).outerHeight()||0,s=i.find("."+h[6]).outerHeight()||0;return 2===t.type?n("iframe"):""===t.area[1]?0t.maxHeight?(a[1]=t.maxHeight,n("."+h[5])):t.fixed&&a[1]>=u.height()&&(a[1]=u.height(),n("."+h[5])):n("."+h[5]),this},t.pt.offset=function(){var e=this,t=e.config,i=e.layero,n=[i.outerWidth(),i.outerHeight()],a="object"===_typeof(t.offset);e.offsetTop=(u.height()-n[1])/2,e.offsetLeft=(u.width()-n[0])/2,a?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=u.width()-n[0]:"b"===t.offset?e.offsetTop=u.height()-n[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=u.height()-n[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=u.width()-n[0]):"rb"===t.offset?(e.offsetTop=u.height()-n[1],e.offsetLeft=u.width()-n[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?u.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?u.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=u.scrollTop(),e.offsetLeft+=u.scrollLeft()),i.attr("minLeft")&&(e.offsetTop=u.height()-(i.find(h[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.attr("myTopLeft")&&(e.offsetTop=i.css("top"),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},t.pt.tips=function(){var e=this.config,t=this.layero,i=[t.outerWidth(),t.outerHeight()],n=d(e.follow);n[0]||(n=d("body"));var a={width:n.outerWidth(),height:n.outerHeight(),top:n.offset().top,left:n.offset().left},o=t.find(".layui-layer-TipsG"),s=e.tips[0];e.tips[1]||o.remove(),a.autoLeft=function(){0"+(i.value||"")+"":'',s=i.success;return delete i.success,p.open(d.extend({type:1,btn:["确定","取消"],content:o,skin:"layui-layer-prompt"+m("prompt"),maxWidth:u.width(),success:function(e){(a=e.find(".layui-layer-input")).focus(),"function"==typeof s&&s(e)},resize:!1,yes:function(e){var t=a.val();""===t?a.focus():t.length>(i.maxlength||500)?p.tips("最多输入"+(i.maxlength||500)+"个字数",a,{tips:1}):n&&n(t,e,a)}},i))},p.tab=function(a){var n=(a=a||{}).tab||{},o="layui-this",i=a.success;return delete a.success,p.open(d.extend({type:1,skin:"layui-layer-tab"+m("tab"),resize:!1,title:function(){var e=n.length,t=1,i="";if(0'+n[0].title+"";t"+n[t].title+"";return i}(),content:'
    '+function(){var e=n.length,t=1,i="";if(0'+(n[0].content||"no content")+"";t'+(n[t].content||"no content")+"";return i}()+"
",success:function(e){var t=e.find(".layui-layer-title").children(),n=e.find(".layui-layer-tabmain").children();t.on("mousedown",function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0;var t=d(this),i=t.index();t.addClass(o).siblings().removeClass(o),n.eq(i).show().siblings().hide(),"function"==typeof a.change&&a.change(i)}),"function"==typeof i&&i(e)}},a))},p.photos=function(a,e,o){var s={};if((a=a||{}).photos){var t=a.photos,r=t.data||[],l=t.start||0;s.imgIndex=1+(0|l),a.img=a.img||"img";var f=a.success;if(delete a.success,0,0===r.length)return p.msg("没有图片");s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=r.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>r.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){var t;s.end||(t=e.keyCode,e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&p.close(s.index))},s.tabimg=function(e){if(!(r.length<=1))return t.start=s.imgIndex-1,p.close(s.index),p.photos(a,!0,e)},s.event=function(){s.bigimg.hover(function(){s.imgsee.show()},function(){s.imgsee.hide()}),s.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),s.imgprev()}),s.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),s.imgnext()}),d(document).on("keyup",s.keyup)},s.loadi=p.load(1,{shade:!("shade"in a)&&.9,scrollbar:!1}),function(e,t,i){var n=new Image;if(n.src=e,n.complete)return t(n);n.onload=function(){n.onload=null,t(n)},n.onerror=function(e){n.onerror=null,i(e)}}(r[l].src,function(e){var t,i,n;p.close(s.loadi),s.index=p.open(d.extend({type:1,id:"layui-layer-photos",area:(i=[e.width,e.height],n=[d(c).width()-100,d(c).height()-100],!a.full&&(i[0]>n[0]||i[1]>n[1])&&((t=[i[0]/n[0],i[1]/n[1]])[1]'+(r[l].alt||
'+(1':"")+'
'+(r[l].alt||"")+""+s.imgIndex+"/"+r.length+"
",success:function(e){s.bigimg=e.find(".layui-layer-phimg"),s.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),s.event(e),a.tab&&a.tab(r[l],e),"function"==typeof f&&f(e)},end:function(){s.end=!0,d(document).off("keyup",s.keyup)}},a))},function(){p.close(s.loadi),p.msg("当前图片地址异常
是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){1