\n \n \n ':'\n \n ')+"\n ":"")+"\n "+(e&&"icon"!==o?'\n \n ":"")+"\n \n "},modal:function(t){var o=t.title,n=t.content,e=t.showCancel,a=t.btnText,s=t.id,i=void 0===s?"modal":s;return'\n \n "},customModal:function(t){return'\n \n "}},customModalTemplate={AlipayQrcode:function(t){return'\n \n '},WeixinpayQrcode:function(t){return'\n \n '},PayMethod:function(t){return'\n
\n'},Download:function(t){return'\n 查看密码: '+t.info+'
前往下载页面若当前下载地址失效请联系站长更新
\n'},Popup:function(t){return'\n \n "}},customModalFunc={addEvent:function(){var o=this;t(popup.element.customModal).on("click","*[data-custom-action]",function(n){var e=t(this).data("custom-action");o[e](t(this),n)})},removeEvent:function(){t(popup.element.customModal).off("click","*[data-custom-action]")}},window.popup={element:{body:"body",head:"head",toast:"#toast",modal:"#modal",customModal:"#customModal",scrollBodyStyle:"#scrollBodyStyle"},addEvent:function(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"body",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,e=this,a=null!==n?'*[data-popup-action="'+n+'"]':"*[data-popup-action]";t(this.element[o]).on("click",a,function(o){var n=t(this).data("popup-action");e[n](t(this),o)})},removeEvent:function(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"body",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,e=null!==n?'*[data-popup-action="'+n+'"]':"*[data-popup-action]";t(this.element[o]).off("click",e)},showToast:function(){var o=this,n=arguments,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=e.type,s=void 0===a?"icon":a,i=e.icon,c=void 0===i?"icon-loading":i,l=e.text,d=void 0===l?"加载中...":l,p=e.display,m=void 0===p?"fs":p,u=e.el,r=void 0===u?"":u,h=e.time,f=void 0===h?1500:h,v=e.callback;t(this.element.body).find(this.element.toast).length<=0?("el"===m?(r="string"==typeof r?t(r):r,r.append(popupTemplate.toast({type:s,icon:c,text:d,display:m}))):t(this.element.body).append(popupTemplate.toast({type:s,icon:c,text:d,display:m})),t(this.element.toast).animate({opacity:1},300),this.toastTimer=setTimeout(function(){t(o.element.toast).animate({opacity:0},300,function(){t(o.element.toast).remove(),"function"==typeof v&&v()})},f)):this.hideToast(function(){o.showToast.call(o,n[0])})},hideToast:function(o){var n=this;t(this.element.toast).animate({opacity:0},300,function(){t(n.element.toast).remove(),clearTimeout(n.toastTimer),n.toastTimer=null,"function"==typeof o&&o()})},showModal:function(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=o.title,e=void 0===n?"提示":n,a=o.content,s=void 0===a?"":a,i=o.showCancel,c=void 0===i||i,l=o.btnText,d=void 0===l?["确定","取消"]:l,p=(o.multiple,o.layerClose),m=void 0!==p&&p,u=(o.success,o.fail,arguments),r=this,h=t(this.element.body).find(this.element.modal).length,f="modal_"+h;t(this.element.body).find("#"+f).length<=0&&(utils.disabledScroll(),t(this.element.body).append(popupTemplate.modal({title:e,content:s,showCancel:c,btnText:d,id:f})),t("#"+f).on("click","*[data-callback]",function(){var o=t(this).data("callback");u.length>0&&u[0]&&"function"==typeof u[0][o]&&u[0][o]&&u[0][o](f)}),m&&t("#"+f).on("click",function(o){r.layerClose(t(this),o)}))},showCustomModal:function(o){var n=o.template,e=void 0===n?"":n,a=o.data,s=void 0===a?{}:a,i=o.callback,c=o.layerClose,l=void 0!==c&&c,d=this;t(this.element.body).find(this.element.customModal).length<=0&&(t(this.element.body).append(popupTemplate.customModal(customModalTemplate[e](s))),this.addEvent("body","customModalClose"),customModalFunc.addEvent(),l&&t(this.element.customModal).on("click",function(o){d.layerClose(t(this),o)}),t(this.element.customModal).find("*[data-custom-submit]").length>0&&t(this.element.customModal).on("click","*[data-custom-submit]",function(){var o={};t(d.element.customModal).find("*[name]").each(function(){var n=t(this).attr("name");o[n]=t(this).val()||""}),"function"==typeof i&&i(t(this),o)}))},hideModal:function(o){t("#"+o).remove(),this.commonHide()},customModalClose:function(t){t.parents(""+this.element.customModal).remove(),this.commonHide()},layerClose:function(o,n){var e=n.target,a=o.data("layer");e.id&&e.id===a&&(t("#"+a).off("click").remove(),this.commonHide())},commonHide:function(){0>=t(this.element.body).find("*[data-lib]").length&&this.removeEvent(),t(this.element.body).off("click",'*[data-popup-action="customModalClose"]'),customModalFunc.removeEvent(),t(this.element.customModal).off("click","*[data-custom-submit]")}}});