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 _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n'+this.option.content+"":"",i=this.option.footerHide?"":this.option.cancelHide?'":'";switch(this.option.type){case"success":n="tips-icon-success";break;case"error":n="tips-icon-error";break;case"info":n="tips-icon-info";break;case"question":n="tips-icon-question";break;case"alert":n="tips-icon-alert";break;default:t=null}o='
 
'+this.option.title+'
 
'+o+i+"
";$("body").append(o),$("".concat("#tipsP"+this.boxId)).addClass("init"),setTimeout(function(){$("".concat("#tipsP"+e.boxId)).addClass("show"),e.listenEvt()},200)}},{key:"success",value:function(e){$.extend(this.option,{type:"success",cancelHide:!0},e),this.init()}},{key:"error",value:function(e){$.extend(this.option,{type:"error",cancelHide:!0},e),this.init()}},{key:"info",value:function(e){$.extend(this.option,{type:"info"},e),this.init()}},{key:"question",value:function(e){$.extend(this.option,{type:"question"},e),this.init()}},{key:"alert",value:function(e){$.extend(this.option,{type:"alert",cancelHide:!0},e),this.init()}},{key:"close",value:function(){var e=this;$("".concat("#tipsP"+this.boxId)).removeClass("init show"),setTimeout(function(){$("".concat("#tipsP"+e.boxId)).remove()},400),this.option.onClose()}},{key:"listenEvt",value:function(){var e=this;0!==e.option.duration&&setTimeout(function(){e.close()},e.option.duration),$("".concat("#tipsP"+this.boxId," .submit-btn")).click(function(){e.option.doneClick(),e.close()}),$("".concat("#tipsP"+this.boxId," .cancel-btn")).click(function(){e.close(),e.option.cancelClick()}),$("".concat("#tipsP"+this.boxId," .tips-popup-mask, ").concat("#tipsP"+this.boxId," .tips-popup-close")).click(function(){e.close()})}}])}();function getVerCode(n){if(!n.url)throw console.error("请填写校验秘钥获取地址!");$(n.el).append('
安全组件加载中
\n
\n
\n
\n
\n
\n
\n
'),$.ajax({url:n.url,type:"get",dataType:"json",success:function(e){$("".concat(n.el," .captcha-title")).hide(),$("".concat(n.el," .captcha-loading-con")).show(),window.initGeetest({lang:n.lang||"zh-cn",gt:e.code.gt,https:!0,challenge:e.code.challenge,new_captcha:e.code.new_captcha,product:"popup",width:"100%",offline:!e.code.success},function(e){var t=e;e.appendTo(n.el),e.onReady(function(){$("".concat(n.el," .captcha-loading-con")).hide()}),e.onError(function(){t.reset()}),n.callback(e)})}})}function codeCountdown(t){if($(t.el).hasClass("disabled"))return!1;var n=null,o=Math.round(+new Date/1e3),n=setInterval(function(){var e=Math.round(+new Date/1e3),e=o+Number(t.interval)-e;0

用微信扫描二维码

'),$("#wechatEwm-".concat(t)).length<=0&&e.append(n),$("#wechatEwm-".concat(t)).qrcode({render:"canvas",text:this.params.url,width:113,height:113}))}},{key:"isWechat",value:function(){return-1!==window.navigator.userAgent.toLowerCase().indexOf("micromessenger")}}])}();function imgViewer(e){$(e).each(function(){new Viewer(this,{title:function(e,t){return e.alt}})})}var Area=function(){return _createClass(function e(t){_classCallCheck(this,e);var n=this,o=window.location.origin;n.options=$.extend({},{url:"".concat(o,"/api/common/area"),placeholder:["请选择省份","请选择城市","请选择区/县"],onSelected:function(){}},t),n.area=[],n.selected=[],$.ajax({url:n.options.url,method:"GET",success:function(e){n.area=e.data,n._init()}})},[{key:"_init",value:function(){var e=this;if(void 0!==e.options.values&&!Array.isArray(e.options.values))throw new Error("地区初始默认值必须传一个数组");e.selected=e.options.values||[],0'.concat(e.options.placeholder[1],"")),$("#selectArea").html('")))}},{key:"_setProvince",value:function(e){for(var t=this.area.filter(function(e){return!e.parent}),n=this,o='"),i=0;i'+t[i].name+"":o+='";$("#selectProvince").off("change").html(o).change(function(){n.selected=[$(this).val()],n.options.onSelected(n.selected),n._setCity($(this).val()),n._setArea("","")})}},{key:"_setCity",value:function(t,e){if(!t&&"string"!=typeof t)throw new Error("必须传省份的值且为字符串");for(var n=this,o=this.area.filter(function(e){return e.parent===t}),i='"),s=0;s'+o[s].name+"":i+='";$("#selectCity").off("change").html(i).change(function(){n.selected[1]=$(this).val(),n.options.onSelected(n.selected),n._setArea($(this).val())})}},{key:"_setArea",value:function(t,e){if(!t&&"string"!=typeof t)throw new Error("必须传城市的值且为字符串");for(var n=this,o=this.area.filter(function(e){return e.parent===t}),i='"),s=0;s'+o[s].name+"":i+='";$("#selectArea").off("change").html(i).change(function(){n.selected[2]=$(this).val(),n.options.onSelected(n.selected),$(".shop-select").trigger("render")})}}])}();