vendor: 4,100 bytes, lines 1-2
1/*! Layer v3.1.1 */ 2;!function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var e=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,i=t.length-1,n=i;n>0;n--)if("interactive"===t[n].readyState){e=t[n].src;break}return e||t[i].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["确定","取消"],type:["dialog","page","iframe","loading","tips"],getStyle:function(t,i){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](i)},link:function(t,i,n){}},r={v:"3.1.1",ie:function(){var t=navigator.userAgent.toLowerCase();return!!(e.ActiveXObject||"ActiveXObject"in e)&&((t.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:e.layer&&e.layer.v?1e5:0,path:o.getPath,config:function(e,t){return e=e||{},r.cache=o.config=i.extend({},o.config,e),r.path=o.config.path||r.path,"string"==typeof e.extend&&(e.extend=[e.extend]),o.config.path&&r.ready(),e.extend?(a?layui.addcss("modules/layer/"+e.extend):o.link("theme/"+e.extend),this):this},ready:function(e){},alert:function(e,t,n){var a="function"==typeof t;return a&&(n=t),r.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,a){var s="function"==typeof t;return s&&(a=n,n=t),r.open(i.extend({content:e,btn:o.btn,yes:n,btn2:a},s?{}:t))},msg:function(e,n,a){var s="function"==typeof n,f=o.config.skin,c=(f?f+" "+f+"-msg":"")||"layui-layer-msg",u=l.anim.length-1;return s&&(a=n),r.open(i.extend({content:e,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:a},s&&!o.config.skin?{skin:c+" layui-layer-hui",anim:u}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!o.config.skin)&&(n.skin=c+" "+(n.skin||"layui-layer-hui")),n}()))},load:function(e,t){return r.open(i.extend({type:3,icon:e||0,resize:!1,shade:.01},t))},tips:function(e,t,n){return r.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:210},n))}},s=function(e){var t=this;t.index=++r.index,t.config=i.extend({},t.config,o.config,e),document.body?t.creat():setTimeout(function(){t.creat()},30)};s.pt=s.prototype;var l=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];l.anim=["layer-anim-00","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],s.pt.config={type:0,shade:.3,fixed:!0,move:l[1],title:"信息",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,isOutAnim:!0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},s.pt.vessel=function(e,t){var n=this,a=n.index,r=n.config,s=r.zIndex+a,f="object"==typeof r.title,c=r.maxmin&&(1===r.type||2===r.type),u=r.title?'<div class="layui-layer-title" style="'+(f?r.title[1]:"")+'">'+(f?r.title[0]:r.title)+"</div>":"";return r.zIndex=s,t([r.shade?'<div class="layui-layer-shade" id="layui-layer-shade'+a+'" times="'+a+'" style="'+("z-index:"+(s-1)+"; ")+'"></div>':"",'<div class="'+l[0]+(" layui-layer-"+o.type[r.type])+(0!=r.type&&2!=r.type||r.shade?"":" layui-layer-border")+" "+(r.skin||"")+'" id="'+l[0]+a+'" type="'+o.type[r.type]+'" times="'+a+'" showtime="'+r.time+'" conType="'+(e?"object":"string")+'" style="z-index: '+s+"; width:"+r.area[0]+";height:"+r.area[1]+(r.fixed?"":";position:absolute;")+'">'+(e&&2!=r.type?"":u)+'<div id="'+(r.id||"")+'" class="layui-layer-content'+(0==r.type&&r.icon!==-1?" layui-layer-padding":"")+(3==r.type?" layui-layer-loading"+r.icon:"")+'">'+(0==r.type&&r.icon!==-1?'<i class="layui-layer-ico layui-layer-ico'+r.icon+'"></i>':"")+(1==r.type&&e?"":r.content||"")+'</div><span class="layui-layer-setwin">'+function(){var e=c?'<a class="layui-layer-min" href="javascript:;"><cite></cite></a><a class="layui-layer-ico layui-layer-max" href="javascript:;"></a>':"";return r.closeBtn&&(e+='<a class="layui-layer-ico '+l[7]+" "+l[7]+(r.title?r.closeBtn:4==r.type?"1":"2")+'" href="javascript:;"></a>'),e}()+"</span>"+(r.btn?function(){var e="";
vendor: 13,002 bytes, line 2
2"string"==typeof r.btn&&(r.btn=[r.btn]);for(var t=0,i=r.btn.length;t<i;t++)e+='<a class="'+l[6]+t+'">'+r.btn[t]+"</a>";return'<div class="'+l[6]+" layui-layer-btn-"+(r.btnAlign||"")+'">'+e+"</div>"}():"")+(r.resize?'<span class="layui-layer-resize"></span>':"")+"</div>"],u,i('<div class="layui-layer-move"></div>')),n},s.pt.creat=function(){var e=this,t=e.config,a=e.index,s=t.content,f="object"==typeof s,c=i("body");if(!t.id||!i("#"+t.id)[0]){switch("string"==typeof t.area&&(t.area="auto"===t.area?["",""]:[t.area,""]),t.shift&&(t.anim=t.shift),6==r.ie&&(t.fixed=!1),t.type){case 0:t.btn="btn"in t?t.btn:o.btn[0],r.closeAll("dialog");break;case 2:var s=t.content=f?t.content:[t.content||"http://layer.layui.com","auto"];t.content='<iframe scrolling="'+(t.content[1]||"auto")+'" allowtransparency="true" id="'+l[4]+a+'" name="'+l[4]+a+'" onload="this.className=\'\';" class="layui-layer-load" frameborder="0" src="'+t.content[0]+'"></iframe>';break;case 3:delete t.title,delete t.closeBtn,t.icon===-1&&0===t.icon,r.closeAll("loading");break;case 4:f||(t.content=[t.content,"body"]),t.follow=t.content[1],t.content=t.content[0]+'<i class="layui-layer-TipsG"></i>',delete t.title,t.tips="object"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||r.closeAll("tips")}if(e.vessel(f,function(n,r,u){c.append(n[0]),f?function(){2==t.type||4==t.type?function(){i("body").append(n[1])}():function(){s.parents("."+l[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+l[0]+a).find("."+l[5]).before(r))}()}():c.append(n[1]),i(".layui-layer-move")[0]||c.append(o.moveElem=u),e.layero=i("#"+l[0]+a),t.scrollbar||l.html.css("overflow","hidden").attr("layer-full",a)}).auto(a),i("#layui-layer-shade"+e.index).css({"background-color":t.shade[1]||"#000",opacity:t.shade[0]||t.shade}),2==t.type&&6==r.ie&&e.layero.find("iframe").attr("src",s[0]),4==t.type?e.tips():e.offset(),t.fixed&&n.on("resize",function(){e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(a),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){r.close(e.index)},t.time),e.move().callback(),l.anim[t.anim]){var u="layer-anim "+l.anim[t.anim];e.layero.addClass(u).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){i(this).removeClass(u)})}t.isOutAnim&&e.layero.data("isOutAnim",!0)}},s.pt.auto=function(e){var t=this,a=t.config,o=i("#"+l[0]+e);""===a.area[0]&&a.maxWidth>0&&(r.ie&&r.ie<8&&a.btn&&o.width(o.innerWidth()),o.outerWidth()>a.maxWidth&&o.width(a.maxWidth));var s=[o.innerWidth(),o.innerHeight()],f=o.find(l[1]).outerHeight()||0,c=o.find("."+l[6]).outerHeight()||0,u=function(e){e=o.find(e),e.height(s[1]-f-c-2*(0|parseFloat(e.css("padding-top"))))};switch(a.type){case 2:u("iframe");break;default:""===a.area[1]?a.maxHeight>0&&o.outerHeight()>a.maxHeight?(s[1]=a.maxHeight,u("."+l[5])):a.fixed&&s[1]>=n.height()&&(s[1]=n.height(),u("."+l[5])):u("."+l[5])}return t},s.pt.offset=function(){var e=this,t=e.config,i=e.layero,a=[i.outerWidth(),i.outerHeight()],o="object"==typeof t.offset;e.offsetTop=(n.height()-a[1])/2,e.offsetLeft=(n.width()-a[0])/2,o?(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=n.width()-a[0]:"b"===t.offset?e.offsetTop=n.height()-a[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=n.width()-a[0]):"rb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?n.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?n.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=n.scrollTop(),e.offsetLeft+=n.scrollLeft()),i.attr("minLeft")&&(e.offsetTop=n.height()-(i.find(l[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},s.pt.tips=function(){var e=this,t=e.config,a=e.layero,o=[a.outerWidth(),a.outerHeight()],r=i(t.follow);r[0]||(r=i("body"));var s={width:r.outerWidth(),height:r.outerHeight(),top:r.offset().top,left:r.offset().left},f=a.find(".layui-layer-TipsG"),c=t.tips[0];t.tips[1]||f.remove(),s.autoLeft=function(){s.left+o[0]-n.width()>0?(s.tipLeft=s.left+s.width-o[0],f.css({right:12,left:"auto"})):s.tipLeft=s.left},s.where=[function(){s.autoLeft(),s.tipTop=s.top-o[1]-10,f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left+s.width+10,s.tipTop=s.top,f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",t.tips[1])},function(){s.autoLeft(),s.tipTop=s.top+s.height+10,f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left-o[0]-10,s.tipTop=s.top,f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",t.tips[1])}],s.where[c-1](),1===c?s.top-(n.scrollTop()+o[1]+16)<0&&s.where[2]():2===c?n.width()-(s.left+s.width+o[0]+16)>0||s.where[3]():3===c?s.top-n.scrollTop()+s.height+o[1]+16-n.height()>0&&s.where[0]():4===c&&o[0]+16-s.left>0&&s.where[1](),a.find("."+l[5]).css({"background-color":t.tips[1],"padding-right":t.closeBtn?"30px":""}),a.css({left:s.tipLeft-(t.fixed?n.scrollLeft():0),top:s.tipTop-(t.fixed?n.scrollTop():0)})},s.pt.move=function(){var e=this,t=e.config,a=i(document),s=e.layero,l=s.find(t.move),f=s.find(".layui-layer-resize"),c={};return t.move&&l.css("cursor","move"),l.on("mousedown",function(e){e.preventDefault(),t.move&&(c.moveStart=!0,c.offset=[e.clientX-parseFloat(s.css("left")),e.clientY-parseFloat(s.css("top"))],o.moveElem.css("cursor","move").show())}),f.on("mousedown",function(e){e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],c.area=[s.outerWidth(),s.outerHeight()],o.moveElem.css("cursor","se-resize").show()}),a.on("mousemove",function(i){if(c.moveStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1],l="fixed"===s.css("position");if(i.preventDefault(),c.stX=l?0:n.scrollLeft(),c.stY=l?0:n.scrollTop(),!t.moveOut){var f=n.width()-s.outerWidth()+c.stX,u=n.height()-s.outerHeight()+c.stY;a<c.stX&&(a=c.stX),a>f&&(a=f),o<c.stY&&(o=c.stY),o>u&&(o=u)}s.css({left:a,top:o})}if(t.resize&&c.resizeStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1];i.preventDefault(),r.style(e.index,{width:c.area[0]+a,height:c.area[1]+o}),c.isResize=!0,t.resizing&&t.resizing(s)}}).on("mouseup",function(e){c.moveStart&&(delete c.moveStart,o.moveElem.hide(),t.moveEnd&&t.moveEnd(s)),c.resizeStart&&(delete c.resizeStart,o.moveElem.hide())}),e},s.pt.callback=function(){function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}var t=this,n=t.layero,a=t.config;t.openLayer(),a.success&&(2==a.type?n.find("iframe").on("load",function(){a.success(n,t.index)}):a.success(n,t.index)),6==r.ie&&t.IE6(n),n.find("."+l[6]).children("a").on("click",function(){var e=i(this).index();if(0===e)a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index);else{var o=a["btn"+(e+1)]&&a["btn"+(e+1)](t.index,n);o===!1||r.close(t.index)}}),n.find("."+l[7]).on("click",e),a.shadeClose&&i("#layui-layer-shade"+t.index).on("click",function(){r.close(t.index)}),n.find(".layui-layer-min").on("click",function(){var e=a.min&&a.min(n);e===!1||r.min(t.index,a)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(r.restore(t.index),a.restore&&a.restore(n)):(r.full(t.index,a),setTimeout(function(){a.full&&a.full(n)},100))}),a.end&&(o.end[t.index]=a.end)},o.reselect=function(){i.each(i("select"),function(e,t){var n=i(this);n.parents("."+l[0])[0]||1==n.attr("layer")&&i("."+l[0]).length<1&&n.removeAttr("layer").show(),n=null})},s.pt.IE6=function(e){i("select").each(function(e,t){var n=i(this);n.parents("."+l[0])[0]||"none"===n.css("display")||n.attr({layer:"1"}).hide(),n=null})},s.pt.openLayer=function(){var e=this;r.zIndex=e.config.zIndex,r.setTop=function(e){var t=function(){r.zIndex++,e.css("z-index",r.zIndex+1)};return r.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",t),r.zIndex}},o.record=function(e){var t=[e.width(),e.height(),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:t})},o.rescollbar=function(e){l.html.attr("layer-full")==e&&(l.html[0].style.removeProperty?l.html[0].style.removeProperty("overflow"):l.html[0].style.removeAttribute("overflow"),l.html.removeAttr("layer-full"))},e.layer=r,r.getChildFrame=function(e,t){return t=t||i("."+l[4]).attr("times"),i("#"+l[0]+t).find("iframe").contents().find(e)},r.getFrameIndex=function(e){return i("#"+e).parents("."+l[4]).attr("times")},r.iframeAuto=function(e){if(e){var t=r.getChildFrame("html",e).outerHeight(),n=i("#"+l[0]+e),a=n.find(l[1]).outerHeight()||0,o=n.find("."+l[6]).outerHeight()||0;n.css({height:t+a+o}),n.find("iframe").css({height:t})}},r.iframeSrc=function(e,t){i("#"+l[0]+e).find("iframe").attr("src",t)},r.style=function(e,t,n){var a=i("#"+l[0]+e),r=a.find(".layui-layer-content"),s=a.attr("type"),f=a.find(l[1]).outerHeight()||0,c=a.find("."+l[6]).outerHeight()||0;a.attr("minLeft");s!==o.type[3]&&s!==o.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-f-c<=64&&(t.height=64+f+c)),a.css(t),c=a.find("."+l[6]).outerHeight(),s===o.type[2]?a.find("iframe").css({height:parseFloat(t.height)-f-c}):r.css({height:parseFloat(t.height)-f-c-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom"))}))},r.min=function(e,t){var a=i("#"+l[0]+e),s=a.find(l[1]).outerHeight()||0,f=a.attr("minLeft")||181*o.minIndex+"px",c=a.css("position");o.record(a),o.minLeft[0]&&(f=o.minLeft[0],o.minLeft.shift()),a.attr("position",c),r.style(e,{width:180,height:s,left:f,top:n.height()-s,position:"fixed",overflow:"hidden"},!0),a.find(".layui-layer-min").hide(),"page"===a.attr("type")&&a.find(l[4]).hide(),o.rescollbar(e),a.attr("minLeft")||o.minIndex++,a.attr("minLeft",f)},r.restore=function(e){var t=i("#"+l[0]+e),n=t.attr("area").split(",");t.attr("type");r.style(e,{width:parseFloat(n[0]),height:parseFloat(n[1]),top:parseFloat(n[2]),left:parseFloat(n[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===t.attr("type")&&t.find(l[4]).show(),o.rescollbar(e)},r.full=function(e){var t,a=i("#"+l[0]+e);o.record(a),l.html.attr("layer-full")||l.html.css("overflow","hidden").attr("layer-full",e),clearTimeout(t),t=setTimeout(function(){var t="fixed"===a.css("position");r.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),a.find(".layui-layer-min").hide()},100)},r.title=function(e,t){var n=i("#"+l[0]+(t||r.index)).find(l[1]);n.html(e)},r.close=function(e){var t=i("#"+l[0]+e),n=t.attr("type"),a="layer-anim-close";if(t[0]){var s="layui-layer-wrap",f=function(){if(n===o.type[1]&&"object"===t.attr("conType")){t.children(":not(."+l[5]+")").remove();for(var a=t.find("."+s),r=0;r<2;r++)a.unwrap();a.css("display",a.data("display")).removeClass(s)}else{if(n===o.type[2])try{var f=i("#"+l[4]+e)[0];f.contentWindow.document.write(""),f.contentWindow.close(),t.find("."+l[5])[0].removeChild(f)}catch(c){}t[0].innerHTML="",t.remove()}"function"==typeof o.end[e]&&o.end[e](),delete o.end[e]};t.data("isOutAnim")&&t.addClass("layer-anim "+a),i("#layui-layer-moves, #layui-layer-shade"+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),t.attr("minLeft")&&(o.minIndex--,o.minLeft.push(t.attr("minLeft"))),r.ie&&r.ie<10||!t.data("isOutAnim")?f():setTimeout(function(){f()},200)}},r.closeAll=function(e){i.each(i("."+l[0]),function(){var t=i(this),n=e?t.attr("type")===e:1;n&&r.close(t.attr("times")),n=null})};var f=r.cache||{},c=function(e){return f.skin?" "+f.skin+" "+f.skin+"-"+e:""};r.prompt=function(e,t){var a="";if(e=e||{},"function"==typeof e&&(t=e),e.area){var o=e.area;a='style="width: '+o[0]+"; height: "+o[1]+';"',delete e.area}var s,l=2==e.formType?'<textarea class="layui-layer-input"'+a+">"+(e.value||"")+"</textarea>":function(){return'<input type="'+(1==e.formType?"password":"text")+'" class="layui-layer-input" value="'+(e.value||"")+'">'}(),f=e.success;return delete e.success,r.open(i.extend({type:1,btn:["确定","取消"],content:l,skin:"layui-layer-prompt"+c("prompt"),maxWidth:n.width(),success:function(e){s=e.find(".layui-layer-input"),s.focus(),"function"==typeof f&&f(e)},resize:!1,yes:function(i){var n=s.val();""===n?s.focus():n.length>(e.maxlength||500)?r.tips("最多输入"+(e.maxlength||500)+"个字数",s,{tips:1}):t&&t(n,i,s)}},e))},r.tab=function(e){e=e||{};var t=e.tab||{},n="layui-this",a=e.success;return delete e.success,r.open(i.extend({type:1,skin:"layui-layer-tab"+c("tab"),resize:!1,title:function(){var e=t.length,i=1,a="";if(e>
vendor: 5,823 bytes, lines 2-11
20)for(a='<span class="'+n+'">'+t[0].title+"</span>";i<e;i++)a+="<span>"+t[i].title+"</span>";return a}(),content:'<ul class="layui-layer-tabmain">'+function(){var e=t.length,i=1,a="";if(e>0)for(a='<li class="layui-layer-tabli '+n+'">'+(t[0].content||"no content")+"</li>";i<e;i++)a+='<li class="layui-layer-tabli">'+(t[i].content||"no content")+"</li>";return a}()+"</ul>",success:function(t){var o=t.find(".layui-layer-title").children(),r=t.find(".layui-layer-tabmain").children();o.on("mousedown",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var a=i(this),o=a.index();a.addClass(n).siblings().removeClass(n),r.eq(o).show().siblings().hide(),"function"==typeof e.change&&e.change(o)}),"function"==typeof a&&a(t)}},e))},r.photos=function(t,n,a){function o(e,t,i){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,t(n)},void(n.onerror=function(e){n.onerror=null,i(e)}))}var s={};if(t=t||{},t.photos){var l=t.photos.constructor===Object,f=l?t.photos:{},u=f.data||[],d=f.start||0;s.imgIndex=(0|d)+1,t.img=t.img||"img";var y=t.success;if(delete t.success,l){if(0===u.length)return r.msg("没有图片")}else{var p=i(t.photos),h=function(){u=[],p.find(t.img).each(function(e){var t=i(this);t.attr("layer-index",e),u.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(h(),0===u.length)return;if(n||p.on("click",t.img,function(){var e=i(this),n=e.attr("layer-index");r.photos(i.extend(t,{photos:{start:n,data:u,tab:t.tab},full:t.full}),!0),h()}),!n)return}s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=u.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>u.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){if(!s.end){var t=e.keyCode;e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&r.close(s.index)}},s.tabimg=function(e){if(!(u.length<=1))return f.start=s.imgIndex-1,r.close(s.index),r.photos(t,!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()}),i(document).on("keyup",s.keyup)},s.loadi=r.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),o(u[d].src,function(n){r.close(s.loadi),s.index=r.open(i.extend({type:1,id:"layui-layer-photos",area:function(){var a=[n.width,n.height],o=[i(e).width()-100,i(e).height()-100];if(!t.full&&(a[0]>o[0]||a[1]>o[1])){var r=[a[0]/o[0],a[1]/o[1]];r[0]>r[1]?(a[0]=a[0]/r[0],a[1]=a[1]/r[0]):r[0]<r[1]&&(a[0]=a[0]/r[1],a[1]=a[1]/r[1])}return[a[0]+"px",a[1]+"px"]}(),title:!1,shade:.9,shadeClose:!0,closeBtn:!1,move:".layui-layer-phimg img",moveType:1,scrollbar:!1,moveOut:!0,isOutAnim:!1,skin:"layui-layer-photos"+c("photos"),content:'<div class="layui-layer-phimg"><img src="'+u[d].src+'" alt="'+(u[d].alt||"")+'" layer-pid="'+u[d].pid+'"><div class="layui-layer-imgsee">'+(u.length>1?'<span class="layui-layer-imguide"><a href="javascript:;" class="layui-layer-iconext layui-layer-imgprev"></a><a href="javascript:;" class="layui-layer-iconext layui-layer-imgnext"></a></span>':"")+'<div class="layui-layer-imgbar" style="display:'+(a?"block":"")+'"><span class="layui-layer-imgtit"><a href="javascript:;">'+(u[d].alt||"")+"</a><em>"+s.imgIndex+"/"+u.length+"</em></span></div></div></div>",success:function(e,i){s.bigimg=e.find(".layui-layer-phimg"),s.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),s.event(e),t.tab&&t.tab(u[d],e),"function"==typeof y&&y(e)},end:function(){s.end=!0,i(document).off("keyup",s.keyup)}},t))},function(){r.close(s.loadi),r.msg("当前图片地址异常<br>是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){u.length>1&&s.imgnext(!0,!0)}})})}},o.run=function(t){i=t,n=i(e),l.html=i("html"),r.open=function(e){var t=new s(e);return t.index}},e.layui&&layui.define?(r.ready(),layui.define("jquery",function(t){r.path=layui.cache.dir,o.run(layui.$),e.layer=r,t("layer",r)})):"function"==typeof define&&define.amd?define(["jquery"],function(){return o.run(e.jQuery),r}):function(){o.run(e.jQuery),r.ready()}()}(window); 3 4 5/*! 6 * clipboard.js v1.6.1 7 * https://zenorocha.github.io/clipboard.js 8 * 9 * Licensed MIT © Zeno Rocha 10 */ 11!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Clipboard=e()}}(function(){var e,t,n;return function e(t,n,o){function i(a,c){if(!n[a]){if(!t[a]){var l="function"==typeof require&&require;if(!c&&l)return l(a,!0);if(r)return r(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var s=n[a]={exports:{}};t[a][0].call(s.exports,function(e){var n=t[a][1][e];return i(n?n:e)},s,s.exports,e,t,n,o)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;a<o.length;a++)i(o[a]);return i}({1:[function(e,t,n){function o(e,t){for(;e&&e.nodeType!==i;){if(e.matches(t))return e;e=e.parentNode}}var i=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var r=Element.prototype;r.matches=r.matchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector}t.exports=o},{}],2:[function(e,t,n){function o(e,t,n,o,r){var a=i.apply(this,arguments);return e.addEventListener(n,a,r),{destroy:function(){e.removeEventListener(n,a,r)}}}function i(e,t,n,o){return function(n){n.delegateTarget=r(n.target,t),n.delegateTarget&&o.call(e,n)}}
vendor: 10,722 bytes, lines 11-25
11var r=e("./closest");t.exports=o},{"./closest":1}],3:[function(e,t,n){n.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},n.nodeList=function(e){var t=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===t||"[object HTMLCollection]"===t)&&"length"in e&&(0===e.length||n.node(e[0]))},n.string=function(e){return"string"==typeof e||e instanceof String},n.fn=function(e){var t=Object.prototype.toString.call(e);return"[object Function]"===t}},{}],4:[function(e,t,n){function o(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!c.string(t))throw new TypeError("Second argument must be a String");if(!c.fn(n))throw new TypeError("Third argument must be a Function");if(c.node(e))return i(e,t,n);if(c.nodeList(e))return r(e,t,n);if(c.string(e))return a(e,t,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function i(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}function r(e,t,n){return Array.prototype.forEach.call(e,function(e){e.addEventListener(t,n)}),{destroy:function(){Array.prototype.forEach.call(e,function(e){e.removeEventListener(t,n)})}}}function a(e,t,n){return l(document.body,e,t,n)}var c=e("./is"),l=e("delegate");t.exports=o},{"./is":3,delegate:2}],5:[function(e,t,n){function o(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var o=window.getSelection(),i=document.createRange();i.selectNodeContents(e),o.removeAllRanges(),o.addRange(i),t=o.toString()}return t}t.exports=o},{}],6:[function(e,t,n){function o(){}o.prototype={on:function(e,t,n){var o=this.e||(this.e={});return(o[e]||(o[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){function o(){i.off(e,o),t.apply(n,arguments)}var i=this;return o._=t,this.on(e,o,n)},emit:function(e){var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),o=0,i=n.length;for(o;o<i;o++)n[o].fn.apply(n[o].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),o=n[e],i=[];if(o&&t)for(var r=0,a=o.length;r<a;r++)o[r].fn!==t&&o[r].fn._!==t&&i.push(o[r]);return i.length?n[e]=i:delete n[e],this}},t.exports=o},{}],7:[function(t,n,o){!function(i,r){if("function"==typeof e&&e.amd)e(["module","select"],r);else if("undefined"!=typeof o)r(n,t("select"));else{var a={exports:{}};r(a,i.select),i.clipboardAction=a.exports}}(this,function(e,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(t),r="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},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),c=function(){function e(t){o(this,e),this.resolveOptions(t),this.initSelection()}return a(e,[{key:"resolveOptions",value:function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function e(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function e(){var t=this,n="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=document.body.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[n?"right":"left"]="-9999px";var o=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=o+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,document.body.appendChild(this.fakeElem),this.selectedText=(0,i.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function e(){this.fakeHandler&&(document.body.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(document.body.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function e(){this.selectedText=(0,i.default)(this.target),this.copyText()}},{key:"copyText",value:function e(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function e(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function e(){this.target&&this.target.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function e(){this.removeFake()}},{key:"action",set:function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function e(){return this._action}},{key:"target",set:function e(t){if(void 0!==t){if(!t||"object"!==("undefined"==typeof t?"undefined":r(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function e(){return this._target}}]),e}();e.exports=c})},{select:5}],8:[function(t,n,o){!function(i,r){if("function"==typeof e&&e.amd)e(["module","./clipboard-action","tiny-emitter","good-listener"],r);else if("undefined"!=typeof o)r(n,t("./clipboard-action"),t("tiny-emitter"),t("good-listener"));else{var a={exports:{}};r(a,i.clipboardAction,i.tinyEmitter,i.goodListener),i.clipboard=a.exports}}(this,function(e,t,n,o){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t){var n="data-clipboard-"+e;if(t.hasAttribute(n))return t.getAttribute(n)}var u=i(t),s=i(n),f=i(o),d=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),h=function(e){function t(e,n){r(this,t);var o=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o.resolveOptions(n),o.listenClick(e),o}return c(t,e),d(t,[{key:"resolveOptions",value:function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText}},{key:"listenClick",value:function e(t){var n=this;this.listener=(0,f.default)(t,"click",function(e){return n.onClick(e)})}},{key:"onClick",value:function e(t){var n=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new u.default({action:this.action(n),target:this.target(n),text:this.text(n),trigger:n,emitter:this})}},{key:"defaultAction",value:function e(t){return l("action",t)}},{key:"defaultTarget",value:function e(t){var n=l("target",t);if(n)return document.querySelector(n)}},{key:"defaultText",value:function e(t){return l("text",t)}},{key:"destroy",value:function e(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],n="string"==typeof t?[t]:t,o=!!document.queryCommandSupported;return n.forEach(function(e){o=o&&!!document.queryCommandSupported(e)}),o}}]),t}(s.default);e.exports=h})},{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8)}); 12 13/*Powered by mobantu.com*/ 14 15jQuery(function($){ 16 popupTemplate = { 17 toast: function(t) { 18 var e = t.type, 19 n = t.icon, 20 a = t.text, 21 s = t.display; 22 return '\n <section class="wppay-toast ' + e + " " + s + '" id="toast">\n ' + (n && "text" !== e ? "\n " + ("icon-loading" === n ? '\n <section class="icon">\n <svg class="circular" viewBox="25 25 50 50">\n <circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="3" stroke-miterlimit="10"/>\n </svg>\n </section>\n ': '\n <section class="icon">\n <i class="wppay ' + n + '"></i>\n </section>\n ') + "\n ": "") + "\n " + (a && "icon" !== e ? '\n <section class="text">\n <p>' + a + "</p>\n </section>\n ": "") + "\n </section>\n " 23 }, 24 customModal: function(t) { 25 return '\n <section class="wppay-custom-modal-box" data-lib="popup" data-popup-action="layerClose" data-layer="customModal" id="customModal">\n <section class="wppay-modal layui-layer-iframe">\n <section data-popup-action="customModalClose"><div class="layui-layer-title">æ¯ä»</div>
25<span class="layui-layer-setwin"><a class="layui-layer-ico layui-layer-close layui-layer-close1" href="javascript:;"></a></span></section>\n ' + t + "\n </section>\n </section>\n " 26 } 27 }, 28 customModalTemplate = { 29 erphpWppayQrcode: function(t) { 30 var payment = _ERPHPDOWN.payment, 31 paymentImg = 'æ«ä¸æ«', 32 bgstyle = ''; 33 if(payment == 6){ 34 bgstyle = 'style="background-color: #21ab36 !important;"'; 35 var aliqr = '',wxqr = '',wxtit='',alitit='',warning='',warning2=''; 36 if(t.code){ 37 if(t.gift){ 38 warning = '<div class="warning">éæºåå ï¼è¯·å¡å¿ æ¯ä»éé¢ï¿¥'+t.price+'</div>'; 39 } 40 if(!t.code2){ 41 aliqr = '<section class="item">\n <div class="wppay-title">æ«ä¸æ«æ¯ä» <span class="price">'+t.price+'</span> å </div>'+warning+' <section class="qr-code">\n <img src="'+t.code+'" class="img" alt="">\n </section>\n <p class="account">æ¯ä»å®æå请çå¾ 5ç§å·¦å³ï¼æé´è¯·å¿å ³éæ¤é¡µé¢</p>\n <p class="desc wtime"></p><p class="wap"><a href="'+t.aliurl+'" target="_blank">å¯å¨æ¯ä»å®APPæ¯ä»</a></p>\n </section>'; 42 alitit = '<a href="javascript:;" data-custom-action="switchWppayPayment" data-payment="alipay" class="active wppay-alipay" >æ¯ä»å®</a>\n'; 43 bgstyle = 'style="background-color: #00a3ee !important;"'; 44 }else{ 45 aliqr = '<section class="item" style="display:none">\n <div class="wppay-title">æ«ä¸æ«æ¯ä» <span class="price">'+t.price+'</span> å </div>'+warning+' <section class="qr-code">\n <img src="'+t.code+'" class="img" alt="">\n </section>\n <p class="account">æ¯ä»å®æå请çå¾ 5ç§å·¦å³ï¼æé´è¯·å¿å ³éæ¤é¡µé¢</p>\n <p class="desc wtime"></p><p class="wap"><a href="'+t.aliurl+'" target="_blank">å¯å¨æ¯ä»å®APPæ¯ä»</a></p>\n </section>'; 46 alitit = '<a href="javascript:;" data-custom-action="switchWppayPayment" data-payment="alipay" class="wppay-alipay" >æ¯ä»å®</a>\n'; 47 } 48 } 49 50 if(t.code2){ 51 if(t.gift2){ 52 warning2 = '<div class="warning">éæºåå ï¼è¯·å¡å¿ æ¯ä»éé¢ï¿¥'+t.price2+'</div>'; 53 } 54 wxqr = '<section class="item">\n <div class="wppay-title">æ«ä¸æ«æ¯ä» <span class="price">'+t.price2+'</span> å </div>'+warning2+' <section class="qr-code">\n <img src="'+t.code2+'" class="img" alt="">\n </section>\n <p class="account">æ¯ä»å®æå请çå¾ 5ç§å·¦å³ï¼æé´è¯·å¿å ³éæ¤é¡µé¢</p>\n <p class="desc wtime"></p><p class="wap">请æªå±ï¼æå¼å¾®ä¿¡æ«ä¸æ«ï¼ä»ç¸åééæ©æªå¾</p>\n </section>'; 55 wxtit = '<a href="javascript:;" data-custom-action="switchWppayPayment" data-payment="weixin" class="active wppay-weixin">微信</a>\n'; 56 } 57 58 return '\n <section class="erphp-wppay-qrcode mobantu-wppay">\n <section class="tab">\n '+wxtit+alitit+' </section>\n <section class="tab-list" '+bgstyle+'>\n '+wxqr+'\n '+aliqr+'\n </section>\n </section>\n ' 59 }else if(payment == 4){ 60 bgstyle = 'style="background-color: #00a3ee !important;"'; 61 return '\n <section class="erphp-wppay-qrcode mobantu-wppay">\n <div class="wppay-title2">æ«ä¸æ«æ¯ä» <span class="price">'+t.price+'</span> å </div> <section class="tab">\n <a href="javascript:;" data-custom-action="switchWppayPayment" data-payment="alipay" class="active wppay-alipay" >æ¯ä»å®</a>\n <a href="javascript:;" data-custom-action="switchWppayPayment" data-payment="weixin" class="wppay-weixin">微信</a>\n </section>\n <section class="tab-list" '+bgstyle+'>\n <section class="item">\n <section class="qr-code">\n <img src="'+t.code+'" class="img" alt="">\n </section>\n <p class="account">æ¯ä»å®æå请çå¾ 5ç§å·¦å³ï¼æé´è¯·å¿å ³éæ¤é¡µé¢</p>\n <p class="desc wtime"></p><p class="wap"><a href="'+t.aliurl+'" target="_blank">å¯å¨æ¯ä»å®APPæ¯ä»</a></p>\n </section>\n <section class="item" style="display:none">\n <section class="qr-code">\n <img src="'+t.code2+'" class="img" alt="">\n </section>\n <p class="account">æ¯ä»å®æå请çå¾ 5ç§å·¦å³ï¼æé´è¯·å¿å ³éæ¤é¡µé¢</p>\n <p class="desc wtime"></p><p class="wap">请æªå±ï¼æå¼å¾®ä¿¡æ«ä¸æ«ï¼ä»ç¸åééæ©æªå¾</p>\n </section>\n </section>\n </section>\n ' 62 }else if(payment == 5){ 63 /* Powered by mobantu.com */ 64 bgstyle = 'style="background-color: #21ab36 !important;"'; 65 var aliqr = '',wxqr = '',wxtit='',alitit='',aliwap = '',wxwap = '<p class="wap">请æªå±ï¼æå¼å¾®ä¿¡æ«ä¸æ«ï¼ä»ç¸åééæ©æªå¾</p>'; 66 if(t.code){ 67 if(t.aliurl){ 68 aliwap = '<p class="wap"><a href="'+t.aliurl+'" target="_blank">å¯å¨æ¯ä»å®APPæ¯ä»</a></p>'; 69 } 70 71 if(!t.code2){ 72 aliqr = '<section class="item">\n <section class="qr-code">\n <img src="'+t.code+'" class="img" alt="">\n </section>\n <p class="account">æ¯ä»å®æå请çå¾ 5ç§å·¦å³ï¼æé´è¯·å¿å ³éæ¤é¡µé¢</p>\n <p class="desc wtime"></p>'+aliwap+'\n </section>'; 73 alitit = '<a href="javascript:;" data-custom-action="switchWppayPayment" data-payment="alipay" class="active wppay-alipay" >æ¯ä»å®</a>\n'; 74 bgstyle = 'style="background-color: #00a3ee !important;"'; 75 }else{ 76 aliqr = '<section class="item" style="display:none">\n <section class="qr-code">\n <img src="'+t.code+'" class="img" alt="">\n </section>\n <p class="account">æ¯ä»å®æå请çå¾ 5ç§å·¦å³ï¼æé´è¯·å¿å ³éæ¤é¡µé¢</p>\n <p class="desc wtime"></p>'+aliwap+'\n </section>'; 77 alitit = '<a href="javascript:;" data-custom-action="switchWppayPayment" data-payment="alipay" class="wppay-alipay" >æ¯ä»å®</a>\n'; 78 } 79 } 80 81 if(t.code2){ 82 83 if(t.wxurl){ 84 wxwap = '<p class="wap"><a href="'+t.wxurl+'" target="_blank">å¯å¨å¾®ä¿¡APPæ¯ä»</a></p>'; 85 } 86 87 wxqr = '<section class="item">\n <section class="qr-code">\n <img src="'+t.code2+'" class="img" alt="">\n </section>\n <p class="account">æ¯ä»å®æå请çå¾ 5ç§å·¦å³ï¼æé´è¯·å¿å ³éæ¤é¡µé¢</p>\n <p class="desc wtime"></p>'+wxwap+'\n </section>'; 88 wxtit = '<a href="javascript:;" data-custom-action="switchWppayPayment" data-payment="weixin" class="active wppay-weixin">微信</a>\n'; 89 } 90 91 return '\n <section class="erphp-wppay-qrcode mobantu-wppay">\n <div class="wppay-title2">æ«ä¸æ«æ¯ä» <span class="price">'+t.price+'</span> å </div> <section class="tab">\n '+wxtit+alitit+' </section>\n <section class="tab-list" '+bgstyle+'>\n '+wxqr+'\n '+aliqr+'\n </section>\n </section>\n ' 92 }else{ 93 var wap = ''; 94 if(payment == 1){ 95 paymentImg = '<div class="payment"><img src="'+_ERPHPDOWN.uri+'/static/images/payment-alipay.png"></div>'; 96 bgstyle = 'style="background-color: #00a3ee !important;"'; 97 wap = '<p class="wap"><a href="'+t.aliurl+'" target="_blank">å¯å¨æ¯ä»å®APPæ¯ä»</a></p>'; 98 }else if(payment == 3){ 99 paymentImg = '<div class="payment"><img src="'+_ERPHPDOWN.uri+'/static/images/payment-weixin.png"></div>'; 100 bgstyle = 'style="background-color: #21ab36 !important;"'; 101 wap = '<p class="desc">ææºç«¯è¯·æªå±ï¼æå¼å¾®ä¿¡æ«ä¸æ«ï¼ä»ç¸åééæ©æªå¾</p>'; 102 } 103 104 return '\n <section class="erphp-wppay-qrcode mobantu-wppay">\n <section class="tab">\n '+paymentImg+'\n </section>\n <section class="tab-list" '+bgstyle+'>\n <section class="item">\n <div class="wppay-title">æ«ä¸æ«æ¯ä» <span class="price">'+t.price+'</span> å </div> <section class="qr-code">\n <img src="'+t.code+'" class="img" alt="">\n </section>\n <p class="account">æ¯ä»å®æå请çå¾ 5ç§å·¦å³ï¼æé´è¯·å¿å ³éæ¤é¡µé¢</p>\n <p class="desc wtime"></p> '+wap+'\n </section>\n </section>\n </section>\n ' 105 } 106 } 107 }, 108 customModalFunc = { 109 addEvent: function() { 110 var t = this; 111 $(popup.element.customModal).on("click", "*[data-custom-action]", 112 function(e) { 113 var n = $(this).data("custom-action"); 114 t[n]($(this), e) 115 }) 116 }, 117 removeEvent: function() { 118 $(popup.element.customModal).off("click", "*[data-custom-action]") 119 }, 120 switchWppayPayment: function(t) { 121 var ptype = t.data("payment"); 122 var e = t.index(); 123 124 if(ptype == "weixin"){ 125 $(".tab-list").css("background-color", "#21ab36"); 126 }else{ 127 $(".tab-list").css("background-color", "#00a3ee"); 128 } 129 130 t.addClass("active").siblings().removeClass("active"), 131 $(".tab-list .item").eq(e).show().siblings().hide() 132 }, 133 }; 134 window.popup = { 135 element: { 136 body: "body", 137 head: "head", 138 toast: "#toast", 139 modal: "#modal", 140 customModal: "#customModal", 141 scrollBodyStyle: "#scrollBodyStyle" 142 }, 143 addEvent: function() { 144 var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "body", 145 e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null, 146 n = this, 147 a = null !== e ? '*[data-popup-action="' + e + '"]': "*[data-popup-action]"; 148 $(this.element[t]).on("click", a, 149 function(t) { 150 var e = $(this).data("popup-action"); 151 n[e]($(this), t) 152 }) 153 }, 154 removeEvent: function() { 155 var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "body", 156 e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null, 157 n = null !== e ? '*[data-popup-action="' + e + '"]': "*[data-popup-action]"; 158 $(this.element[t]).off("click", n) 159 }, 160 showToast: function() { 161 var t = this, 162 e = arguments, 163 n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, 164 a = n.type, 165 s = void 0 === a ? "icon": a, 166 o = n.icon, 167 i = void 0 === o ? "icon-loading": o, 168 c = n.text, 169 l = void 0 === c ? "å è½½ä¸...": c, 170 d = n.display, 171 p = void 0 === d ? "fs": d, 172 m = n.el, 173 u = void 0 === m ? "": m, 174 r = n.time, 175 h = void 0 === r ? 1500 : r, 176 v = n.callback; 177 $(this.element.body).find(this.element.toast).length <= 0 ? ("el" === p ? (u = "string" == typeof u ? $(u) : u, u.append(popupTemplate.toast({ 178 type: s, 179 icon: i, 180 text: l, 181 display: p 182 }))) : $(this.element.body).append(popupTemplate.toast({ 183 type: s, 184 icon: i, 185 text: l, 186 display: p 187 })), $(this.element.toast).animate({ 188 opacity: 1 189 }, 190 300), this.toastTimer = setTimeout(function() { 191 $(t.element.toast).animate({ 192 opacity: 0 193 }, 194 300, 195 function() { 196 $(t.element.toast).remove(), 197 "function" == typeof v && v() 198 }) 199 }, 200 h)) : this.hideToast(function() { 201 t.showToast.call(t, e[0]) 202 }) 203 }, 204 hideToast: function(t) { 205 var e = this; 206 $(this.element.toast).animate({ 207 opacity: 0 208 }, 209 300, 210 function() { 211 $(e.element.toast).remove(), 212 clearTimeout(e.toastTimer), 213 e.toastTimer = null, 214 "function" == typeof t ? t() : void 0 215 }) 216 }, 217 showCustomModal: function(t) { 218 var e = t.template, 219 n = void 0 === e ? "": e, 220 a = t.data, 221 s = void 0 === a ? {}: a, 222 o = t.callback, 223 i = t.layerClose, 224 c = void 0 === i ? !1 : i, 225 l = this; 226 $(this.element.body).find(this.element.customModal).length <= 0 && ($(this.element.body).append(popupTemplate.customModal(customModalTemplate[n](s))), this.addEvent("body", "customModalClose"), customModalFunc.addEvent(), c && $(this.element.customModal).on("click", 227 function(t) { 228 l.layerClose($(this), t) 229 }), $(this.element.customModal).find("*[data-custom-submit]").length > 0 && $(this.element.customModal).on("click", "*[data-custom-submit]", 230 function() { 231 var t = {}; 232 $(l.element.customModal).find("*[name]").each(function() { 233 var e = $(this).attr("name"); 234 t[e] = $(this).val() || "" 235 }), 236 "function" == typeof o ? o($(this), t) : function() {} 237 })) 238 }, 239 hideModal: function(t) { 240 $("#" + t).remove(), 241 this.commonHide() 242 }, 243 customModalClose: function(t) { 244 t.parents("" + this.element.customModal).remove(), 245 this.commonHide() 246 }, 247 layerClose: function(t, e) { 248 var n = e.target, 249 a = t.data("layer"); 250 n.id && n.id === a && ($("#" + a).off("click").remove(), this.commonHide()) 251 }, 252 commonHide: function() { 253 var t = $(this.element.body).find("*[data-lib]").length; 254 0 >= t && (this.removeEvent()), 255 $(this.element.body).off("click", '*[data-popup-action="customModalClose"]'), 256 customModalFunc.removeEvent(), 257 $(this.element.customModal).off("click", "*[data-custom-submit]") 258 } 259 }; 260 261 var erphpWppayTimer, erphpWppayOrder; 262 $("body").on("click", ".erphp-wppay-loader", function(){ 263 clear
263Interval(erphpWppayOrder); 264 clearInterval(erphpWppayTimer); 265 var post_id = $(this).data("post"); 266 if(post_id){ 267 if(_ERPHPDOWN.wppay == 'link'){ 268 var href = _ERPHPDOWN.uri+"/buy.php?postid="+post_id; 269 layer.open({ 270 type: 2, 271 area: ['360px', '445px'], 272 title: 'è´ä¹°è¯¦æ ', 273 resize:false, 274 scrollbar: false, 275 shadeClose: true, 276 content: href 277 }); 278 }else{ 279 popup.showToast({ 280 type: "it", 281 text: "å¤çä¸...", 282 time: 1e5 283 }); 284 $.post(_ERPHP.ajaxurl, { 285 "action": "epd_wppay", 286 "post_id": post_id 287 }, function(result) { 288 if( result.status == 202 ){ 289 $.post(_ERPHP.ajaxurl, { 290 "action": "epd_wppay_pay", 291 "post_id": post_id, 292 "order_num": result.num 293 }, function(data) { 294 if(data.status == "1"){ 295 clearInterval(erphpWppayOrder); 296 popup.hideModal('customModal'); 297 popup.showToast({ 298 type: "text", 299 text: "æ¯ä»æåï¼" 300 }); 301 //location.reload(true); 302 if (window.location.href.indexOf("?") != -1) { 303 location.href=window.location.href+'×tamp='+new Date().getTime(); 304 }else{ 305 location.href=window.location.href+'?timestamp='+new Date().getTime(); 306 } 307 } 308 }); 309 }else if( result.status == 200 ){ 310 popup.hideToast(); 311 312 popup.showCustomModal({ 313 template: "erphpWppayQrcode", 314 layerClose: 0, 315 data: { 316 price: result.price, 317 price2: result.price2, 318 code: result.code, 319 code2: result.code2, 320 gift: result.gift, 321 gift2: result.gift2, 322 aliurl: result.aliurl, 323 wxurl: result.wxurl 324 } 325 }); 326 327 var m = 5; 328 if(result.minute) m = result.minute; 329 330 erphpWppayOrder = setInterval(function() { 331 $.post(_ERPHP.ajaxurl, { 332 "action": "epd_wppay_pay", 333 "post_id": post_id, 334 "order_num": result.num 335 }, function(data) { 336 if(data.status == "1"){ 337 clearInterval(erphpWppayOrder); 338 popup.hideModal('customModal'); 339 popup.showToast({ 340 type: "text", 341 text: "æ¯ä»æåï¼" 342 }); 343 //location.reload(true); 344 if (window.location.href.indexOf("?") != -1) { 345 location.href=window.location.href+'×tamp='+new Date().getTime(); 346 }else{ 347 location.href=window.location.href+'?timestamp='+new Date().getTime(); 348 } 349 } 350 }); 351 }, 5000); 352 353 var s = 0; 354 wppayCountdown(); 355 erphpWppayTimer = setInterval(function(){ wppayCountdown(); },1000); 356 function wppayCountdown(){ 357 $(".wtime").html("æ¯ä»å计æ¶ï¼<span>0"+m+"å"+s+"ç§</span>"); 358 if( m == 0 && s == 0 ){ 359 clearInterval(erphpWppayOrder); 360 clearInterval(erphpWppayTimer); 361 popup.hideModal('customModal'); 362 m = 4; 363 s = 59; 364 }else if( m >= 0 ){ 365 if( s > 0 ){ 366 s--; 367 }else if( s == 0 ){ 368 m--; 369 s = 59; 370 } 371 } 372 } 373 374 }else if( result.status == 201 ){ 375 popup.showToast({ 376 type: "text", 377 text: result.msg 378 }); 379 }else{ 380 popup.showToast({ 381 type: "text", 382 text: "è·åæ¯ä»ä¿¡æ¯å¤±è´¥ï¼" 383 }); 384 } 385 }, 'json'); 386 } 387 }else{ 388 popup.showToast({ 389 type: "text", 390 text: "è·åæ¯ä»ä¿¡æ¯å¤±è´¥ï¼" 391 }); 392 } 393 394 return false; 395 });
396 397 $("body").on("click", ".erphpdown-buy-index", function(){ 398 var post_id = $(this).data("post"), 399 index_id = $(this).data("index"), 400 price = $(this).data("price"), 401 that = $(this); 402 403 if(post_id && index_id && price){ 404 popup.showToast({ 405 type: "it", 406 text: "å¤çä¸...", 407 time: 1e5 408 }); 409 $.post(_ERPHP.ajaxurl, { 410 "action": "epd_index", 411 "post_id": post_id, 412 "index_id": index_id, 413 "price": price 414 }, function(result) { 415 if( result.status == 200 ){ 416 popup.showToast({ 417 type: "text", 418 text: "è´ä¹°æåï¼" 419 }); 420 //location.reload(true); 421 if (window.location.href.indexOf("?") != -1) { 422 location.href=window.location.href+'×tamp='+new Date().getTime(); 423 }else{ 424 location.href=window.location.href+'?timestamp='+new Date().getTime(); 425 } 426 }else if( result.status == 201 ){ 427 popup.showToast({ 428 type: "text", 429 text: result.msg 430 }); 431 }else if( result.status == 202 ){ 432 if(!that.parent().find(".erphpdown-vip-index").length){ 433 that.after('<a href="'+result.recharge+'" target="_blank" class="erphpdown-vip erphpdown-vip-index">ç«å³å å¼</a>'); 434 } 435 popup.showToast({ 436 type: "text", 437 text: result.msg 438 }); 439 }else{ 440 popup.showToast({ 441 type: "text", 442 text: "è´ä¹°å¤±è´¥ï¼è¯·ç¨åéè¯ï¼" 443 }); 444 } 445 }, 'json'); 446 }else{ 447 popup.showToast({ 448 type: "text", 449 text: "è´ä¹°å¤±è´¥ï¼è¯·ç¨åéè¯ï¼" 450 }); 451 } 452 return false; 453 }); 454 455 var bodyWidth = $(window).width(); 456 457 $("body").on("click", ".erphpdown-vip-do", function(){ 458 var user_type = $(this).data("type"); 459 if(user_type){ 460 var href = _ERPHPDOWN.uri+"/buy.php?user_type="+user_type; 461 layer.open({ 462 type: 2, 463 area: ['360px', '480px'], 464 title: 'è´ä¹°VIP', 465 resize:false, 466 scrollbar: false, 467 shadeClose: true, 468 content: href 469 }); 470 } 471 return false; 472 }) 473 474 $(".do-erphpdown-vip-pay").click(function(){ 475 var that = $(this); 476 var type = that.data("type"); 477 if(type){ 478 that.text("æ¯ä»ä¸...").attr("disabled","disabled"); 479 $.post(_ERPHP.ajaxurl, { 480 "action": "epd_vip_pay", 481 "type": type 482 }, function(data) { 483 that.text("ä½é¢æ¯ä»").removeAttr("disabled"); 484 if( data.error ){ 485 if( data.msg ){ 486 layer.msg(data.msg); 487 } 488 }else{ 489 layer.msg("å级æå"); 490 parent.location.reload(); 491 } 492 }, 'json'); 493 } 494 return false; 495 }); 496 497 498 $("body").on("click", ".erphpdown-iframe", function(){ 499 var href = $(this).attr("href"); 500 layer.open({ 501 type: 2, 502 area: ['360px', '480px'], 503 title: 'è´ä¹°è¯¦æ ', 504 resize:false, 505 scrollbar: false, 506 shadeClose: true, 507 content: href 508 }); 509 return false; 510 }); 511 512 513 $("body").on("click", ".erphpdown-down-layui", function(){ 514 var href = $(this).attr("href"); 515 layer.open({ 516 type: 2, 517 area: ['360px', '445px'], 518 title: 'ä¸è½½è¯¦æ ', 519 resize:false, 520 scrollbar: false, 521 shadeClose: true, 522 content: href 523 }); 524 return false; 525 });
526 527 528 $("body").on("click", ".erphpdown-see-btn", function(){ 529 var post_id = $(this).data("post"), 530 token = $(this).data("token"), 531 vip = $(this).data("vip"); 532 if(post_id){ 533 popup.showToast({ 534 type: "it", 535 text: "å¤çä¸...", 536 time: 1e5 537 }); 538 $.post(_ERPHP.ajaxurl, { 539 "action": "epd_see", 540 "post_id": post_id, 541 "vip": vip, 542 "token": token 543 }, function(result) { 544 545 if( result.status == 200 ){ 546 popup.hideToast(); 547 location.reload(true); 548 }else if( result.status == 202 ){ 549 popup.showToast({ 550 type: "text", 551 text: "æ±æï¼æéä¸è¶³ï¼" 552 }); 553 }else{ 554 popup.showToast({ 555 type: "text", 556 text: "æ¥ç失败ï¼è¯·æ£æ¥ä»å¤©çæ¥çæ¬¡æ°æ¯å¦å·²ç¨å ï¼" 557 }); 558 } 559 }, 'json'); 560 }else{ 561 popup.showToast({ 562 type: "text", 563 text: "æ¥ç失败ï¼" 564 }); 565 } 566 return false; 567 }); 568 569 $("body").on("click", ".erphp-checkin", function(){ 570 var that = $(this); 571 if(!that.hasClass("disabled")){ 572 that.addClass("disabled"); 573 if(!that.hasClass("active")){ 574 that.text("ç¾å°ä¸..."); 575 $.post(_ERPHP.ajaxurl, { 576 "action": "epd_checkin" 577 }, function(result) { 578 579 if( result.status == 200 ){ 580 that.addClass("active").text("ç¾å°æå"); 581 layer.msg("ç¾å°æå"); 582 }else{ 583 that.text("仿¥ç¾å°"); 584 layer.msg(result.msg); 585 } 586 }, 'json'); 587 } 588 } 589 590 return false; 591 }); 592 593 $("body").on("click", ".erphpdown-checkpan", function(){ 594 var post_id = $(this).data("id"), 595 post_buy = $(this).data("buy"), 596 post_index = $(this).data("index"), 597 that = $(this); 598 if(post_id){ 599 popup.showToast({ 600 type: "it", 601 text: "æ£æµä¸...", 602 time: 1e5 603 }); 604 $.post(_ERPHP.ajaxurl, { 605 "action": "epd_check_pan", 606 "post_id": post_id, 607 "post_index": post_index 608 }, function(data) { 609 if(data.status == "500" || data.status == "200"){ 610 popup.showToast({ 611 type: "text", 612 text: data.msg 613 }); 614 if(data.status == "200"){ 615 that.removeClass("erphpdown-checkpan").addClass("erphpdown-iframe erphpdown-buy").attr("href",post_buy).text("ç«å³è´ä¹°"); 616 } 617 }else{ 618 popup.showToast({ 619 type: "text", 620 text: "æ£æµå¤±è´¥ï¼è¯·ç¨åéè¯ï¼" 621 }); 622 } 623 }); 624 } 625 return false; 626 }); 627 628 $("body").on("click", ".erphpdown-checkpan2", function(){ 629 var post_id = $(this).data("id"), 630 post_index = $(this).data("index"), 631 that = $(this); 632 if(post_id){ 633 popup.showToast({ 634 type: "it", 635 text: "æ£æµä¸...", 636 time: 1e5 637 }); 638 $.post(_ERPHP.ajaxurl, { 639 "action": "epd_check_pan", 640 "post_id": post_id, 641 "post_index": post_index 642 }, function(data) { 643 if(data.status == "500" || data.status == "200"){ 644 popup.showToast({ 645 type: "text", 646 text: data.msg 647 }); 648 if(data.status == "200"){ 649 that.removeClass("erphpdown-checkpan2").addClass("erphp-wppay-loader").text("ç«å³è´ä¹°"); 650 } 651 }else{ 652 popup.showToast({ 653 type: "text", 654 text: "æ£æµå¤±è´¥ï¼è¯·ç¨åéè¯ï¼" 655 }); 656 } 657 }); 658 } 659 return false; 660 });
661 662 $("body").on("click", ".erphp-promo-do", function(){ 663 var promo = $("#erphp_promo").val(), 664 that = $(this); 665 if(promo){ 666 $.post(_ERPHP.ajaxurl, { 667 "action": "epd_promo", 668 "promo": promo 669 }, function(data) { 670 if(data.status == '1'){ 671 672 if(that.hasClass('erphp-promo-do-vip')){ 673 if($(".erphpdown-type-desc .type-price span").data("price")){ 674 var oldprice = parseFloat($(".erphpdown-type-desc .type-price span").data("price")); 675 }else{ 676 var oldprice = parseFloat($(".erphpdown-type-desc .type-price span").text()); 677 } 678 if(data.type == 1){ 679 if(oldprice <= data.money){ 680 layer.msg("æ±æï¼ä»·æ ¼å¼å¸¸"); 681 return false; 682 } 683 $(".erphpdown-type-desc .type-price span").html(parseFloat(oldprice-data.money).toFixed(2)+' <del>'+oldprice.toFixed(2)+'</del>'); 684 }else if(data.type == 2){
685 $(".erphpdown-type-desc .type-price span").html(parseFloat(oldprice*0.1*data.money).toFixed(2)+' <del>'+oldprice.toFixed(2)+'</del>'); 686 } 687 688 }else{ 689 var nologin = 0; 690 if($(".item-price .tit t").hasClass("no-login")){ 691 nologin = 1; 692 } 693 var oldprice = parseFloat($(".item-price .tit t").data("price")); 694 var lmoney = $("#erphpdown_left").text(); 695 var jmoney = data.money; 696 if(nologin == '1'){ 697 jmoney = data.money / $(".item-price .tit t").data("proportion"); 698 } 699 if(data.type == 1){ 700 if(oldprice <= jmoney){ 701 layer.msg("æ±æï¼ä»·æ ¼å¼å¸¸"); 702 return false; 703 } 704 $(".item-price .tit t").html(parseFloat(oldprice-jmoney).toFixed(2)+' <del>'+oldprice.toFixed(2)+'</del>'); 705 if(lmoney >= (oldprice-jmoney)){ 706 $(".erphpdown-btn-show").hide(); 707 $(".erphpdown-btn-hide").show(); 708 } 709 }else if(data.type == 2){
710 $(".item-price .tit t").html(parseFloat(oldprice*0.1*data.money).toFixed(2)+' <del>'+oldprice.toFixed(2)+'</del>'); 711 if(lmoney >= (oldprice*0.1*data.money)){ 712 $(".erphpdown-btn-show").hide(); 713 $(".erphpdown-btn-hide").show(); 714 } 715 } 716 } 717 718 if(data.type == 1){ 719 layer.msg("伿 ç ä½¿ç¨æåï¼ä»·æ ¼å"+data.money); 720 }else if(data.type == 2){ 721 layer.msg("伿 ç ä½¿ç¨æåï¼ä»·æ ¼"+data.money+"æ"); 722 } 723 }else{ 724 layer.msg("伿 ç æ æ"); 725 } 726 }); 727 } 728 return false; 729 }); 730 731 if($(".erphpdown-see-pay").length > 1){ 732 $(".erphpdown-see-pay .erphpdown-buy, .erphpdown-see-pay .erphp-see-must").after('<span class="erphpdown-see-tips">ï¼è´ä¹°ä¸ä¸ªï¼æ¥çææï¼</span>'); 733 } 734 735 if($(".erphpdown-see.erphpdown-see-video").length){ 736 $(".erphpdown-see.erphpdown-see-video").each(function(){ 737 $(this).height($(this).width()*9/16); 738 }); 739 } 740 741 742 var clipboard = new Clipboard(".erphpdown-copy"); 743 clipboard.on("success", function(e) { 744 layer.msg("å·²å¤å¶",{time:500}); 745 }); 746}); 747 748function erphpdownOrderSuccess(){ 749 layer.open({ 750 title: 'æç¤º', 751 area: ['360px', '180px'], 752 btn: ['å·²æ¯ä»', 'åæ³æ³'], 753 content: 'è®¢åæ¯å¦å·²æ¯ä»ï¼', 754 yes: function(index, layero){ 755 layer.close(index); 756 //location.reload(true); 757 if (window.location.href.indexOf("?") != -1) { 758 location.href=window.location.href+'×tamp='+new Date().getTime(); 759 }else{ 760 location.href=window.location.href+'?timestamp='+new Date().getTime(); 761 } 762 } 763 ,btn2: function(index, layero){ 764 layer.close(index); 765 } 766 }); 767} 768 769/* Powered by QQ:82708210 */
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.