webpackJsonp([0],{"4AsB":function(t,e,s){"use strict";var i={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{directives:[{name:"show",rawName:"v-show",value:t.isAlert,expression:"isAlert"}],staticClass:"alert alert-reset",on:{click:function(e){return e.preventDefault(),e.stopPropagation(),e.target!==e.currentTarget?null:t.closeLayer(e)}}},[s("div",{staticClass:"alert"},[s("div",{staticClass:"alert-content alert-catch"},[s("button",{staticClass:"btn btn-default alert-close",on:{click:function(e){return e.preventDefault(),e.stopPropagation(),e.target!==e.currentTarget?null:t.closeLayer(e)}}},[t._v("×")]),t._v(" "),s("h6",{staticClass:"alert-title"},[t._v("安全验证")]),t._v(" "),s("div",{ref:"catchaBox",staticClass:"alert-catch-success nc-container",attrs:{id:"captcha"}})])])])},staticRenderFns:[]};e.a=i},RXv3:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=s("WhTE"),c=s("4AsB");var a=function(t){s("r76V")},n=s("/4AN")(i.a,c.a,!1,a,"data-v-9e8849c6",null);e.default=n.exports},WhTE:function(t,e,s){"use strict";var i=s("HxWs"),c=s.n(i),a=s("gc0D"),n=s.n(a),o=s("3Z84"),r=s("Eq1g"),u=void 0,h=function(t){var e={},s=void 0;return"status"in t&&(e.status=t.status,s=!0,t.code&&(e.code=t.code),t.message&&(e.message=t.message)),s?e:null};e.a={name:"catchComponent",data:function(){return{isCatcha:!1,isAlert:!1,isCreate:!1,defaultOptions:{}}},props:["componentInfo","catcha"],methods:{init:function(){this.startCatch()},initSet:function(){var t=this,e={mode:this.modeType,success:function(e){t.submitCatcha(e)}};e=this.isCheckDevice?n()(e,{customWidth:300,width:250,height:30}):n()(e,{isH5:!0,customWidth:"40%"}),this.$set(this,"defaultOptions",e)},startCatch:function(){u=s.i(o.j)(this.defaultOptions)},closeLayer:function(t){var e=document.querySelector(".nc-style");this.$set(this,"isCatcha",!1),e&&document.body.removeChild(e)},submitCatcha:function(t){var e=this;if(!t)return e.$emit("notice",h({code:-1,message:"参数错误!"})),!1;var s=this.componentInfo.catchaType,i={};i.source=s,i.nvcValue=t,i=c()(i),!this.isCheckDevice&&this.closeLayer();var a={url:r.a.publicApi.checkHvcUrl,method:"post",data:i,success:function(t){t=o.a.jsonResultSelector(t.data),e.isCheckDevice&&e.closeLayer(),e.$emit("notice",h(t))},error:function(t){var s=o.a.jsonResultSelector(t.data);e.isCheckDevice&&e.closeLayer(),e.$emit("notice",h(s))}};a.v=e,o.a.sendAjax(a)},dispatchCatcha:function(){var t=this,e=this.componentInfo.catchaType;u.catchStart({url:""+r.a.publicApi.checkNvcUrl,source:e,finish:function(){t.$set(t,"isAlert",!0),t.$set(t,"isCreate",!0)},success:function(e){t.$emit("notice",h({status:!0,code:200,message:"success"})),t.$set(t,"isCatcha",!1)},fail:function(e){t.$emit("notice",h({status:!0,code:500,message:"success"}))}})}},computed:{isCheckDevice:function(){return"pc"===this.componentInfo.type},modeType:function(){return this.componentInfo.pageType}},watch:{isCatcha:function(t,e){!0===t?this.isCreate?this.$set(this,"isAlert",!0):this.dispatchCatcha():(this.$set(this,"isAlert",!1),this.$set(this,"isCreate",!1),this.$emit("update:catcha",!1))},"componentInfo.isCatcha":{immediate:!0,handler:function(t){this.$set(this,"isCatcha",!!t)}}},created:function(){this.initSet()},mounted:function(){!this.isCreate&&this.init()}}},r76V:function(t,e){}});