require('../../../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/users/components/verify/verifyPoint/verifyPoint"],{4113:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("1a0c"),r=n("3c98"),c={name:"VerifyPoints",props:{mode:{type:String,default:"fixed"},captchaType:{type:String},vSpace:{type:Number,default:5},imgSize:{type:Object,default:function(){return{width:"310px",height:"155px"}}},barSize:{type:Object,default:function(){return{width:"310px",height:"40px"}}},defaultImg:{type:String,default:""}},data:function(){return{secretKey:"",checkNum:3,fontPos:[],checkPosArr:[],num:1,pointBackImgBase:"",poinTextList:[],backToken:"",imgRand:0,setSize:{imgHeight:0,imgWidth:0,barHeight:0,barWidth:0},showImage:!0,tempPoints:[],text:"",barAreaColor:"#fff",barAreaBorderColor:"#fff",showRefresh:!0,bindingClick:!0,imgLeft:"",imgTop:""}},methods:{init:function(){var t=this;this.fontPos.splice(0,this.fontPos.length),this.checkPosArr.splice(0,this.checkPosArr.length),this.num=1,this.$nextTick((function(){t.refresh(),t.$parent.$emit("ready",t)}))},canvasClick:function(e){var n=this,c=t.createSelectorQuery().in(this);c.select("#image").boundingClientRect((function(t){n.imgLeft=Math.ceil(t.left),n.imgTop=Math.ceil(t.top),n.checkPosArr.push(n.getMousePos(n.$refs.canvas,e)),n.num==n.checkNum&&(n.num=n.createPoint(n.getMousePos(n.$refs.canvas,e)),n.checkPosArr=n.pointTransfrom(n.checkPosArr,n.imgSize),setTimeout((function(){var t=n.secretKey?(0,i.aesEncrypt)(n.backToken+"---"+JSON.stringify(n.checkPosArr),n.secretKey):n.backToken+"---"+JSON.stringify(n.checkPosArr),e={captchaType:n.captchaType,pointJson:n.secretKey?(0,i.aesEncrypt)(JSON.stringify(n.checkPosArr),n.secretKey):JSON.stringify(n.checkPosArr),token:n.backToken};(0,r.ajcaptchaCheck)(e).then((function(e){e.data;n.barAreaColor="#4cae4c",n.barAreaBorderColor="#5cb85c",n.text="验证成功",n.bindingClick=!1,setTimeout((function(){"pop"==n.mode&&(n.$parent.clickShow=!1),n.refresh()}),1500),n.$parent.$emit("success",{captchaVerification:t})})).catch((function(t){n.$parent.$emit("error",n),n.barAreaColor="#d9534f",n.barAreaBorderColor="#d9534f",n.text="验证失败",setTimeout((function(){n.refresh()}),700)}))}),400)),n.num