徐总多门店
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jiuhaoshenghuo/public/view_admin/js/chunk-08bfa7e0.49ba107f.js

1 line
15 KiB

4 months ago
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-08bfa7e0"],{4793:function(t,e,i){},"5d39":function(t,e,i){"use strict";var s=i("3452"),o=i.n(s);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"XwKsGlMcdPMEhR1B",i=o.a.enc.Utf8.parse(e),s=o.a.enc.Utf8.parse(t);return o.a.AES.encrypt(s,i,{mode:o.a.mode.ECB,padding:o.a.pad.Pkcs7}).toString()}function r(t){var e=t.$el.parentNode.offsetWidth||window.offsetWidth,i=t.$el.parentNode.offsetHeight||window.offsetHeight;return{imgWidth:-1!=t.imgSize.width.indexOf("%")?parseInt(this.imgSize.width)/100*e+"px":this.imgSize.width,imgHeight:-1!=t.imgSize.height.indexOf("%")?parseInt(this.imgSize.height)/100*i+"px":this.imgSize.height,barWidth:-1!=t.barSize.width.indexOf("%")?parseInt(this.barSize.width)/100*e+"px":this.barSize.width,barHeight:-1!=t.barSize.height.indexOf("%")?parseInt(this.barSize.height)/100*i+"px":this.barSize.height}}var a=i("2934"),c={name:"VerifySlide",props:{captchaType:{type:String},type:{type:String,default:"1"},mode:{type:String,default:"fixed"},vSpace:{type:Number,default:5},explain:{type:String,default:"向右滑动完成验证"},imgSize:{type:Object,default:function(){return{width:"310px",height:"155px"}}},blockSize:{type:Object,default:function(){return{width:"50px",height:"50px"}}},barSize:{type:Object,default:function(){return{width:"310px",height:"40px"}}},defaultImg:{type:String,default:""}},data:function(){return{secretKey:"",passFlag:"",backImgBase:"",blockBackImgBase:"",backToken:"",startMoveTime:"",endMovetime:"",tipsBackColor:"",tipWords:"",text:"",finishText:"",setSize:{imgHeight:0,imgWidth:0,barHeight:0,barWidth:0},top:0,left:0,moveBlockLeft:void 0,leftBarWidth:void 0,moveBlockBackgroundColor:void 0,leftBarBorderColor:"#ddd",iconColor:void 0,iconClass:"icon-right",status:!1,isEnd:!1,showRefresh:!0,transitionLeft:"",transitionWidth:""}},computed:{barArea:function(){return this.$el.querySelector(".verify-bar-area")},resetSize:function(){return r}},watch:{type:{immediate:!0,handler:function(){this.init()}}},mounted:function(){this.$el.onselectstart=function(){return!1}},methods:{init:function(){var t=this;this.text=this.explain,this.getPictrue(),this.$nextTick((function(){var e=t.resetSize(t);for(var i in e)t.$set(t.setSize,i,e[i]);t.$parent.$emit("ready",t)}));var e=this;window.removeEventListener("touchmove",(function(t){e.move(t)})),window.removeEventListener("mousemove",(function(t){e.move(t)})),window.removeEventListener("touchend",(function(){e.end()})),window.removeEventListener("mouseup",(function(){e.end()})),window.addEventListener("touchmove",(function(t){e.move(t)})),window.addEventListener("mousemove",(function(t){e.move(t)})),window.addEventListener("touchend",(function(){e.end()})),window.addEventListener("mouseup",(function(){e.end()}))},start:function(t){if((t=t||window.event).touches)e=t.touches[0].pageX;else var e=t.clientX;this.startLeft=Math.floor(e-this.barArea.getBoundingClientRect().left),this.startMoveTime=+new Date,0==this.isEnd&&(this.text="",this.moveBlockBackgroundColor="#337ab7",this.leftBarBorderColor="#337AB7",this.iconColor="#fff",t.stopPropagation(),this.status=!0)},move:function(t){if(t=t||window.event,this.status&&0==this.isEnd){if(t.touches)e=t.touches[0].pageX;else var e=t.clientX;var i=e-this.barArea.getBoundingClientRect().left;i>=this.barArea.offsetWidth-parseInt(parseInt(this.blockSize.width)/2)-2&&(i=this.barArea.offsetWidth-parseInt(parseInt(this.blockSize.width)/2)-2),i<=0&&(i=parseInt(parseInt(this.blockSize.width)/2)),this.moveBlockLeft=i-this.startLeft+"px",this.leftBarWidth=i-this.startLeft+"px"}},end:function(){var t=this;this.endMovetime=+new Date;var e=this;if(this.status&&0==this.isEnd){var i=parseInt((this.moveBlockLeft||"").replace("px",""));i=310*i/parseInt(this.setSize.imgWidth);var s={captchaType:this.captchaType,pointJson:this.secretKey?n(JSON.stringify({x:i,y:5}),this.secretKey):JSON.stringify({x:i,y:5}),token:this.backToken};Object(a.b)(s).then((function(e){t.moveBlockBackgroundColor="#5cb85c",t.leftBarBorderColor="#5cb85c",t.iconColor="#fff",t.iconCla