chunk-c2608482.372c561c.js 33 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c2608482"],{1069:function(t,e,n){!function(e,n){t.exports=n()}(0,(function(){return function(){"use strict";var t={358:function(t,e,n){var i=n(81),o=n.n(i),s=n(645),a=n.n(s)()(o());a.push([t.id,".vue-puzzle-vcode {\n position: fixed;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n background-color: rgba(0, 0, 0, 0.3);\n z-index: 999;\n opacity: 0;\n pointer-events: none;\n -webkit-transition: opacity 200ms;\n transition: opacity 200ms;\n}\n.vue-puzzle-vcode.show_ {\n opacity: 1;\n pointer-events: auto;\n}\n.vue-auth-box_ {\n position: absolute;\n top: 40%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n padding: 20px;\n background: #fff;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n border-radius: 3px;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);\n}\n.vue-auth-box_ .auth-body_ {\n position: relative;\n overflow: hidden;\n border-radius: 3px;\n}\n.vue-auth-box_ .auth-body_ .loading-box_ {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n background-color: rgba(0, 0, 0, 0.8);\n z-index: 20;\n opacity: 1;\n -webkit-transition: opacity 200ms;\n transition: opacity 200ms;\n display: -webkit-box;\n display: -webkit-flex;\n display: flex;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n}\n.vue-auth-box_ .auth-body_ .loading-box_.hide_ {\n opacity: 0;\n pointer-events: none;\n}\n.vue-auth-box_ .auth-body_ .loading-box_.hide_ .loading-gif_ span {\n -webkit-animation-play-state: paused;\n animation-play-state: paused;\n}\n.vue-auth-box_ .auth-body_ .loading-box_ .loading-gif_ {\n -webkit-box-flex: 0;\n -webkit-flex: none;\n flex: none;\n height: 5px;\n line-height: 0;\n}\n@-webkit-keyframes load {\n0% {\n opacity: 1;\n -webkit-transform: scale(1.3);\n transform: scale(1.3);\n}\n100% {\n opacity: 0.2;\n -webkit-transform: scale(0.3);\n transform: scale(0.3);\n}\n}\n@keyframes load {\n0% {\n opacity: 1;\n -webkit-transform: scale(1.3);\n transform: scale(1.3);\n}\n100% {\n opacity: 0.2;\n -webkit-transform: scale(0.3);\n transform: scale(0.3);\n}\n}\n.vue-auth-box_ .auth-body_ .loading-box_ .loading-gif_ span {\n display: inline-block;\n width: 5px;\n height: 100%;\n margin-left: 2px;\n border-radius: 50%;\n background-color: #888;\n -webkit-animation: load 1.04s ease infinite;\n animation: load 1.04s ease infinite;\n}\n.vue-auth-box_ .auth-body_ .loading-box_ .loading-gif_ span:nth-child(1) {\n margin-left: 0;\n}\n.vue-auth-box_ .auth-body_ .loading-box_ .loading-gif_ span:nth-child(2) {\n -webkit-animation-delay: 0.13s;\n animation-delay: 0.13s;\n}\n.vue-auth-box_ .auth-body_ .loading-box_ .loading-gif_ span:nth-child(3) {\n -webkit-animation-delay: 0.26s;\n animation-delay: 0.26s;\n}\n.vue-auth-box_ .auth-body_ .loading-box_ .loading-gif_ span:nth-child(4) {\n -webkit-animation-delay: 0.39s;\n animation-delay: 0.39s;\n}\n.vue-auth-box_ .auth-body_ .loading-box_ .loading-gif_ span:nth-child(5) {\n -webkit-animation-delay: 0.52s;\n animation-delay: 0.52s;\n}\n.vue-auth-box_ .auth-body_ .info-box_ {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 24px;\n line-height: 24px;\n text-align: center;\n overflow: hidden;\n font-size: 13px;\n background-color: #83ce3f;\n opacity: 0;\n -webkit-transform: translateY(24px);\n transform: translateY(24px);\n -webkit-transition: all 200ms;\n transition: all 200ms;\n color: #fff;\n z-index: 10;\n}\n.vue-auth-box_ .auth-body_ .info-box_.show {\n opacity: 0.95;\n -webkit-transform: translateY(0);\n transform: translateY(0);\n}\n.vue-auth-box_ .auth-body_ .info-box_.fail {\n background-color: #ce594b;\n}\n.vue-auth-box_ .auth-body_ .auth-canvas2_ {\n position: absolute;\n top: 0;\n left: 0;\n width: 60px;\n height: 100%;\n z-index: 2;\n}\n.vue-auth-box_ .auth-body_ .auth-canvas3_ {\n position: absolute;\n top: 0;\n left: 0;\n opacity: 0;\n -webkit-transition: opacity 600ms;\n transition: opacity 600ms;\n z-index: 3;\n}\n.vue-auth-box_ .auth-body_ .auth-canvas3_.show {\n opacity: 1;\n}\n.vue-auth-box_ .auth-body_ .flash_ {\n position: absolute;\n top: 0;\n left: 0;\n width: 30px;\n height: 100%;\n background-color: rgba(255, 255, 255, 0.1);\n z-index: 3;\n}\n.vue-auth-box_ .auth-body_ .flash_.show {\n -webkit-transition: -webkit-transform 600ms;\n transition: -webkit-transform 600ms;\n transition: transform 600ms;\n transition: transform 600ms, -webkit-transform 600ms;\n}\n.vue-auth-box_ .auth-body_ .reset_ {\n position: absolute;\n top: 2px;\n right: 2px;\n width: 35px;\n height: auto;\n z-index: 12;\n cursor: pointer;\n -webkit-transition: -webkit-transform 200ms;\n transition: -webkit-transform 200ms;\n transition: transform 200ms;\n transition: transform 200ms, -webkit-transform 200ms;\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n}\n.vue-auth-box_ .auth-body_ .reset_:hover {\n -webkit-transform: rotate(-90deg);\n transform: rotate(-90deg);\n}\n.vue-auth-box_ .auth-control_ .range-box {\n position: relative;\n width: 100%;\n background-color: #eef1f8;\n margin-top: 20px;\n border-radius: 3px;\n box-shadow: 0 0 8px rgba(240, 240, 240, 0.6) inset;\n}\n.vue-auth-box_ .auth-control_ .range-box .range-text {\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n font-size: 14px;\n color: #b7bcd1;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n text-align: center;\n width: 100%;\n}\n.vue-auth-box_ .auth-control_ .range-box .range-slider {\n position: absolute;\n height: 100%;\n width: 50px;\n background-color: rgba(106, 160, 255, 0.8);\n border-radius: 3px;\n}\n.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn {\n position: absolute;\n display: -webkit-box;\n display: -webkit-flex;\n display: flex;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n right: 0;\n width: 50px;\n height: 100%;\n background-color: #fff;\n border-radius: 3px;\n box-shadow: 0 0 4px #ccc;\n cursor: pointer;\n}\n.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn > div {\n width: 0;\n height: 40%;\n -webkit-transition: all 200ms;\n transition: all 200ms;\n border: solid 1px #6aa0ff;\n}\n.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn > div:nth-child(2) {\n margin: 0 4px;\n}\n.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn:hover > div:first-child,\n.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn.isDown > div:first-child {\n border: solid 4px transparent;\n height: 0;\n border-right-color: #6aa0ff;\n}\n.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn:hover > div:nth-child(2),\n.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn.isDown > div:nth-child(2) {\n border-width: 3px;\n height: 0;\n border-radius: 3px;\n margin: 0 6px;\n border-right-color: #6aa0ff;\n}\n.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn:hover > div:nth-child(3),\n.vue-auth-box_ .auth-control_ .range-box .range-slider .range-btn.isDown > div:nth-child(3) {\n border: solid 4px transparent;\n height: 0;\n border-left-color: #6aa0ff;\n}\n.vue-puzzle-overflow {\n overflow: hidden !important;\n}\n",""]),e.Z=a},645:function(t){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",i=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),i&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),i&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,i,o,s){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(i)for(var r=0;r<this.length;r++){var l=this[r][0];null!=l&&(a[l]=!0)}for(var c=0;c<t.length;c++){var h=[].concat(t[c]);i&&a[h[0]]||(void 0!==s&&(void 0===h[5]||(h[1]="@layer".concat(h[5].length>0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=s),n&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=n):h[2]=n),o&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=o):h[4]="".concat(o)),e.push(h))}},e}},81:function(t){t.exports=function(t){return t[1]}},379:function(t){var e=[];function n(t){for(var n=-1,i=0;i<e.length;i++)if(e[i].identifier===t){n=i;break}return n}function i(t,i){for(var s={},a=[],r=0;r<t.length;r++){var l=t[r],c=i.base?l[0]+i.base:l[0],h=s[c]||0,u="".concat(c," ").concat(h);s[c]=h+1;var d=n(u),p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==d)e[d].references++,e[d].updater(p);else{var m=o(p,i);i.byIndex=r,e.splice(r,0,{identifier:u,updater:m,references:1})}a.push(u)}return a}function o(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,o){var s=i(t=t||[],o=o||{});return function(t){t=t||[];for(var a=0;a<s.length;a++){var r=n(s[a]);e[r].references--}for(var l=i(t,o),c=0;c<s.length;c++){var h=n(s[c]);0===e[h].references&&(e[h].updater(),e.splice(h,1))}s=l}}},569:function(t){var e={};t.exports=function(t,n){var i=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(n)}},216:function(t){t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},565:function(t,e,n){t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},795:function(t){t.exports=function(t){var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var i="";n.supports&&(i+="@supports (".concat(n.supports,") {")),n.media&&(i+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(i+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),i+=n.css,o&&(i+="}"),n.media&&(i+="}"),n.supports&&(i+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(i,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},589:function(t){t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var s=e[i]={id:i,exports:{}};return t[i](s,s.exports,n),s.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return function(){n.r(i),n.d(i,{default:function(){return w}});var t=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:["vue-puzzle-vcode",{show_:t.show}],on:{mousedown:t.onCloseMouseDown,mouseup:t.onCloseMouseUp,touchstart:t.onCloseMouseDown,touchend:t.onCloseMouseUp}},[n("div",{staticClass:"vue-auth-box_",on:{mousedown:function(t){t.stopPropagation()},touchstart:function(t){t.stopPropagation()}}},[n("div",{staticClass:"auth-body_",style:"height: "+t.canvasHeight+"px"},[n("canvas",{ref:"canvas1",style:"width:"+t.canvasWidth+"px;height:"+t.canvasHeight+"px",attrs:{width:t.canvasWidth,height:t.canvasHeight}}),t._v(" "),n("canvas",{ref:"canvas3",class:["auth-canvas3_",{show:t.isSuccess}],style:"width:"+t.canvasWidth+"px;height:"+t.canvasHeight+"px",attrs:{width:t.canvasWidth,height:t.canvasHeight}}),t._v(" "),n("canvas",{ref:"canvas2",staticClass:"auth-canvas2_",style:"width:"+t.puzzleBaseSize+"px;height:"+t.canvasHeight+"px;transform:translateX("+(t.styleWidth-t.sliderBaseSize-(t.puzzleBaseSize-t.sliderBaseSize)*((t.styleWidth-t.sliderBaseSize)/(t.canvasWidth-t.sliderBaseSize)))+"px)",attrs:{width:t.puzzleBaseSize,height:t.canvasHeight}}),t._v(" "),n("div",{class:["loading-box_",{hide_:!t.loading}]},[t._m(0)]),t._v(" "),n("div",{class:["info-box_",{show:t.infoBoxShow},{fail:t.infoBoxFail}]},[t._v("\n "+t._s(t.infoText)+"\n ")]),t._v(" "),n("div",{class:["flash_",{show:t.isSuccess}],style:"transform: translateX("+(t.isSuccess?t.canvasWidth+.578*t.canvasHeight+"px":"-"+.578*t.canvasHeight+"px")+") skew(-30deg, 0);"}),t._v(" "),n("img",{staticClass:"reset_",attrs:{src:t.resetSvg},on:{click:t.reset}})]),t._v(" "),n("div",{staticClass:"auth-control_"},[n("div",{staticClass:"range-box",style:"height:"+t.sliderBaseSize+"px"},[n("div",{staticClass:"range-text"},[t._v(t._s(t.sliderText))]),t._v(" "),n("div",{ref:"range-slider",staticClass:"range-slider",style:"width:"+t.styleWidth+"px"},[n("div",{class:["range-btn",{isDown:t.mouseDown}],style:"width:"+t.sliderBaseSize+"px",on:{mousedown:function(e){return t.onRangeMouseDown(e)},touchstart:function(e){return t.onRangeMouseDown(e)}}},[n("div"),t._v(" "),n("div"),t._v(" "),n("div")])])])])])])};t._withStripped=!0;var e={props:{canvasWidth:{type:Number,default:310},canvasHeight:{type:Number,default:160},show:{type:Boolean,default:!1},puzzleScale:{type:Number,default:1},sliderSize:{type:Number,default:50},range:{type:Number,default:10},imgs:{type:Array},successText:{type:String,default:"验证通过!"},failText:{type:String,default:"验证失败,请重试"},sliderText:{type:String,default:"拖动滑块完成拼图"}},data:()=>({mouseDown:!1,startWidth:50,startX:0,newX:0,pinX:0,pinY:0,loading:!1,isCanSlide:!1,error:!1,infoBoxShow:!1,infoText:"",infoBoxFail:!1,timer1:null,closeDown:!1,isSuccess:!1,imgIndex:-1,isSubmting:!1,resetSvg:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAELklEQVRYR+2YW2wUZRTH//9vtlCoF9IoIklT3PqgPGi326hoetuaGEhIr9SgCYkkgt2WGOQVCca+GavWdr0GjD4YhG3RB3hply1LQA1tEQIxEXapGI2pEkys9LIzx2ylYWfY6e5sF0oi+7hzzvl+3/9855xvhrjNf7zN+XAHcL4Z+n8o6JWTeYt++W25S596AIZy6TB+n3yo+Nchlk8vmIIVowdXU9c3Q1gDSilBlQwjgBAYFGDvdF58/4milqvZwDpOcXWsb5Uh8hmBqkwXFMhlCN8aX5LXNbRy/T+Z+iXsHAFWRXs3QGQPyLucLDJrK5DgUXdTsxPfjAEro8E3Ce50EtxsKxPTwCPH3U2jTmJkBJgWTnAMxDeGMEoa0xQ+LJQnCD4HYFkCyAC3RdwN3U7gMkpxRTTYrMD91sCJIgCxV5R6O1Jcfy7VwonqLoj9/CqB2kF341qncGkBvRe+ureAWpRgoalCBecMFzcdK24YymZRJz5zprgq1tsJwXYL3CVZGvdGHmwZc7JQtra2gE+f712ep2QUYP714DJhaJrXLqXZQszlZwtYdSHoB9ljVk/ePVrSZFL0ZkAlxzQBVseCT8WhZhRThtFB8plk9Zi/qCi8cv0fNxvKFrDy4oF11NXXIFy2EII4iBcG3Y03VLZT8OqRd5aFPduvOEpxRayvXolxAKB2g6NgEhobBlc1HHYKY7WvHf5wtVAPgegIlbbZ9seUZ7AyFnwewi9pGoUyDmhrB931kfnC1ZwOeKlLP8GZJi6QLSFP2yep4toXSbT3ZQAfX3O6omt8Nhd9r/aHQAUMOQywYBZo5uZD2ThQ2rbPCjlnH6yI9rUryE5DU75ctJaake46Be4DuDjF8dFBNA94/AdtiySVxIlpMlTS8td801o70vMigM9huTda2lhcKHVHPO2HZv/P6LIwX7hk/+qzPSvUJGMkrg8AQYTkroRdXMlE+HH/twsG6BsOdJHYZlaO/lBZ6weOiiSXqs3Gqj0TeAxx+T75DIpgwjC0onD51pQD4JaluPrkR/cpFT9DcoVp84LOgTL/DjtBbglgou+puHwB8lEznPxJw1XSX77VtgizBvQNBw4RMqB7xt4Lc3c8lQKJaQHoO4R8ydz0/7MWoCXk8c85MrMC9J3qaafw/WtQlwXST+F3BnAeYB4obgJ1BJIuG+YtiKAjVOZ/Pd1ZdwzoG+4uBtSPpjaRbhXLcwF3hzytb2TilgVgT5BkYybBrTYC+Rvg5nRpdTRJrIs8+VPXPQXj2i4ItxC4O2NQQUQnN4U9rRcz9nH64p4ceM2lziX5Y4s3KHCdUHwE77ecMkMEp6BwhIa2Z6DslZRvfulgHafYLuCas58WLp2aLCFUga70qxOFU6dPFL2W1feYeaU43Y5z/TxnCuYabMEuC043ckdBp4pZ7f8FE5psOI1g6fwAAAAASUVORK5CYII="}),mounted(){document.body.appendChild(this.$el),document.addEventListener("mousemove",this.onRangeMouseMove,!1),document.addEventListener("mouseup",this.onRangeMouseUp,!1),document.addEventListener("touchmove",this.onRangeMouseMove,{passive:!1}),document.addEventListener("touchend",this.onRangeMouseUp,!1),this.show&&(document.body.classList.add("vue-puzzle-overflow"),this.reset())},beforeDestroy(){clearTimeout(this.timer1),document.body.removeChild(this.$el),document.removeEventListener("mousemove",this.onRangeMouseMove,!1),document.removeEventListener("mouseup",this.onRangeMouseUp,!1),document.removeEventListener("touchmove",this.onRangeMouseMove,{passive:!1}),document.removeEventListener("touchend",this.onRangeMouseUp,!1)},watch:{show(t){t?(document.body.classList.add("vue-puzzle-overflow"),this.reset()):(this.isSubmting=!1,this.isSuccess=!1,this.infoBoxShow=!1,document.body.classList.remove("vue-puzzle-overflow"))}},computed:{styleWidth(){const t=this.startWidth+this.newX-this.startX;return t<this.sliderBaseSize?this.sliderBaseSize:t>this.canvasWidth?this.canvasWidth:t},puzzleBaseSize(){return Math.round(52.5*Math.max(Math.min(this.puzzleScale,2),.2)+6)},sliderBaseSize(){return Math.max(Math.min(Math.round(this.sliderSize),Math.round(.5*this.canvasWidth)),10)}},methods:{onClose(){this.mouseDown||(clearTimeout(this.timer1),this.$emit("close"))},onCloseMouseDown(){this.closeDown=!0},onCloseMouseUp(){this.closeDown&&this.onClose(),this.closeDown=!1},onRangeMouseDown(t){this.isCanSlide&&(this.mouseDown=!0,this.startWidth=this.$refs["range-slider"].clientWidth,this.newX=t.clientX||t.changedTouches[0].clientX,this.startX=t.clientX||t.changedTouches[0].clientX)},onRangeMouseMove(t){this.mouseDown&&(t.preventDefault(),this.newX=t.clientX||t.changedTouches[0].clientX)},onRangeMouseUp(){this.mouseDown&&(this.mouseDown=!1,this.submit())},init(t){if(this.loading&&!t)return;this.loading=!0,this.isCanSlide=!1;const e=this.$refs.canvas1,n=this.$refs.canvas2,i=this.$refs.canvas3,o=e.getContext("2d"),s=n.getContext("2d"),a=i.getContext("2d"),r=navigator.userAgent.indexOf("Firefox")>=0&&navigator.userAgent.indexOf("Windows")>=0,l=document.createElement("img");if(o.fillStyle="rgba(255,255,255,1)",a.fillStyle="rgba(255,255,255,1)",o.clearRect(0,0,this.canvasWidth,this.canvasHeight),s.clearRect(0,0,this.canvasWidth,this.canvasHeight),this.pinX=this.getRandom(this.puzzleBaseSize,this.canvasWidth-this.puzzleBaseSize-20),this.pinY=this.getRandom(20,this.canvasHeight-this.puzzleBaseSize-20),l.crossOrigin="anonymous",l.onload=()=>{const[t,e,n,i]=this.makeImgSize(l);o.save(),this.paintBrick(o),o.closePath(),r?(o.clip(),o.save(),o.shadowOffsetX=0,o.shadowOffsetY=0,o.shadowColor="#000",o.shadowBlur=3,o.fill(),o.restore()):(o.shadowOffsetX=0,o.shadowOffsetY=0,o.shadowColor="#000",o.shadowBlur=3,o.fill(),o.clip()),o.drawImage(l,t,e,n,i),a.fillRect(0,0,this.canvasWidth,this.canvasHeight),a.drawImage(l,t,e,n,i),o.globalCompositeOperation="source-atop",this.paintBrick(o),o.arc(this.pinX+Math.ceil(this.puzzleBaseSize/2),this.pinY+Math.ceil(this.puzzleBaseSize/2),1.2*this.puzzleBaseSize,0,2*Math.PI,!0),o.closePath(),o.shadowColor="rgba(255, 255, 255, .8)",o.shadowOffsetX=-1,o.shadowOffsetY=-1,o.shadowBlur=Math.min(Math.ceil(8*this.puzzleScale),12),o.fillStyle="#ffffaa",o.fill();const c=o.getImageData(this.pinX-3,this.pinY-20,this.pinX+this.puzzleBaseSize+5,this.pinY+this.puzzleBaseSize+5);s.putImageData(c,0,this.pinY-20),o.restore(),o.clearRect(0,0,this.canvasWidth,this.canvasHeight),o.save(),this.paintBrick(o),o.globalAlpha=.8,o.fillStyle="#ffffff",o.fill(),o.restore(),o.save(),o.globalCompositeOperation="source-atop",this.paintBrick(o),o.arc(this.pinX+Math.ceil(this.puzzleBaseSize/2),this.pinY+Math.ceil(this.puzzleBaseSize/2),1.2*this.puzzleBaseSize,0,2*Math.PI,!0),o.shadowColor="#000",o.shadowOffsetX=2,o.shadowOffsetY=2,o.shadowBlur=16,o.fill(),o.restore(),o.save(),o.globalCompositeOperation="destination-over",o.drawImage(l,t,e,n,i),o.restore(),this.loading=!1,this.isCanSlide=!0},l.onerror=()=>{this.init(!0)},!t&&this.imgs&&this.imgs.length){let t=this.getRandom(0,this.imgs.length-1);t===this.imgIndex&&(t===this.imgs.length-1?t=0:t++),this.imgIndex=t,l.src=this.imgs[t]}else l.src=this.makeImgWithCanvas()},getRandom:(t,e)=>Math.ceil(Math.random()*(e-t)+t),makeImgSize(t){const e=t.width/t.height;let n=0,i=0,o=0,s=0;return e>this.canvasWidth/this.canvasHeight?(s=this.canvasHeight,o=e*s,i=0,n=(this.canvasWidth-o)/2):(o=this.canvasWidth,s=o/e,n=0,i=(this.canvasHeight-s)/2),[n,i,o,s]},paintBrick(t){const e=Math.ceil(15*this.puzzleScale);t.beginPath(),t.moveTo(this.pinX,this.pinY),t.lineTo(this.pinX+e,this.pinY),t.arcTo(this.pinX+e,this.pinY-e/2,this.pinX+e+e/2,this.pinY-e/2,e/2),t.arcTo(this.pinX+e+e,this.pinY-e/2,this.pinX+e+e,this.pinY,e/2),t.lineTo(this.pinX+e+e+e,this.pinY),t.lineTo(this.pinX+e+e+e,this.pinY+e),t.arcTo(this.pinX+e+e+e+e/2,this.pinY+e,this.pinX+e+e+e+e/2,this.pinY+e+e/2,e/2),t.arcTo(this.pinX+e+e+e+e/2,this.pinY+e+e,this.pinX+e+e+e,this.pinY+e+e,e/2),t.lineTo(this.pinX+e+e+e,this.pinY+e+e+e),t.lineTo(this.pinX,this.pinY+e+e+e),t.lineTo(this.pinX,this.pinY+e+e),t.arcTo(this.pinX+e/2,this.pinY+e+e,this.pinX+e/2,this.pinY+e+e/2,e/2),t.arcTo(this.pinX+e/2,this.pinY+e,this.pinX,this.pinY+e,e/2),t.lineTo(this.pinX,this.pinY)},makeImgWithCanvas(){const t=document.createElement("canvas"),e=t.getContext("2d");t.width=this.canvasWidth,t.height=this.canvasHeight,e.fillStyle=`rgb(${this.getRandom(100,255)},${this.getRandom(100,255)},${this.getRandom(100,255)})`,e.fillRect(0,0,this.canvasWidth,this.canvasHeight);for(let n=0;n<12;n++)if(e.fillStyle=`rgb(${this.getRandom(100,255)},${this.getRandom(100,255)},${this.getRandom(100,255)})`,e.strokeStyle=`rgb(${this.getRandom(100,255)},${this.getRandom(100,255)},${this.getRandom(100,255)})`,this.getRandom(0,2)>1)e.save(),e.rotate(this.getRandom(-90,90)*Math.PI/180),e.fillRect(this.getRandom(-20,t.width-20),this.getRandom(-20,t.height-20),this.getRandom(10,t.width/2+10),this.getRandom(10,t.height/2+10)),e.restore();else{e.beginPath();const n=this.getRandom(-Math.PI,Math.PI);e.arc(this.getRandom(0,t.width),this.getRandom(0,t.height),this.getRandom(10,t.height/2+10),n,n+1.5*Math.PI),e.closePath(),e.fill()}return t.toDataURL("image/png")},submit(){this.isSubmting=!0;const t=Math.abs(this.pinX-(this.styleWidth-this.sliderBaseSize)+(this.puzzleBaseSize-this.sliderBaseSize)*((this.styleWidth-this.sliderBaseSize)/(this.canvasWidth-this.sliderBaseSize))-3);t<this.range?(this.infoText=this.successText,this.infoBoxFail=!1,this.infoBoxShow=!0,this.isCanSlide=!1,this.isSuccess=!0,clearTimeout(this.timer1),this.timer1=setTimeout(()=>{this.isSubmting=!1,this.$emit("success",t)},800)):(this.infoText=this.failText,this.infoBoxFail=!0,this.infoBoxShow=!0,this.isCanSlide=!1,this.$emit("fail",t),clearTimeout(this.timer1),this.timer1=setTimeout(()=>{this.isSubmting=!1,this.reset()},800))},resetState(){this.infoBoxFail=!1,this.infoBoxShow=!1,this.isCanSlide=!1,this.isSuccess=!1,this.startWidth=this.sliderBaseSize,this.startX=0,this.newX=0},reset(){this.isSubmting||(this.resetState(),this.init())}}},o=n(379),s=n.n(o),a=n(795),r=n.n(a),l=n(569),c=n.n(l),h=n(565),u=n.n(h),d=n(216),p=n.n(d),m=n(589),f=n.n(m),g=n(358),v={};v.styleTagTransform=f(),v.setAttributes=u(),v.insert=c().bind(null,"head"),v.domAPI=r(),v.insertStyleElement=p(),s()(g.Z,v),g.Z&&g.Z.locals&&g.Z.locals;var b=function(t,e,n,i,o,s,a,r){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"loading-gif_"},[n("span"),t._v(" "),n("span"),t._v(" "),n("span"),t._v(" "),n("span"),t._v(" "),n("span")])}],c._compiled=!0),l)if(c.functional){c._injectStyles=l;var h=c.render;c.render=function(t,e){return l.call(e),h(t,e)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:t,options:c}}(e,t);b.options.__file="src/app.vue";var w=b.exports}(),i}()}))},"318e":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"page-account"},[n("div",{staticClass:"container",class:[t.fullWidth>768?"containerSamll":"containerBig"]},[t.fullWidth>768?n("swiper",{staticClass:"swiperPross",attrs:{options:t.swiperOption}},[t._l(t.swiperList,(function(t,e){return n("swiper-slide",{key:e,staticClass:"swiperPic"},[n("img",{attrs:{src:t.slide}})])})),n("div",{staticClass:"swiper-pagination",attrs:{slot:"pagination"},slot:"pagination"})],2):t._e(),n("div",{staticClass:"index_from page-account-container from-wh"},[n("div",{staticClass:"page-account-top"},[n("div",{staticClass:"page-account-top-logo"},[n("img",{staticStyle:{width:"100%",height:"74px"},attrs:{src:t.login_logo,alt:"logo"}})])]),n("Form",{ref:"formInline",attrs:{model:t.formInline,rules:t.ruleInline},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleSubmit("formInline")}}},[n("FormItem",{attrs:{prop:"username"}},[n("Input",{attrs:{type:"text",prefix:"ios-contact-outline",placeholder:"请输入用户名",size:"large"},model:{value:t.formInline.username,callback:function(e){t.$set(t.formInline,"username",e)},expression:"formInline.username"}})],1),n("FormItem",{attrs:{prop:"password"}},[n("Input",{attrs:{type:"password",prefix:"ios-lock-outline",placeholder:"请输入密码",size:"large"},model:{value:t.formInline.password,callback:function(e){t.$set(t.formInline,"password",e)},expression:"formInline.password"}})],1),n("FormItem",{attrs:{prop:"code"}},[n("div",{staticClass:"code"},[n("Input",{attrs:{type:"text",prefix:"ios-keypad-outline",placeholder:"请输入验证码",size:"large"},model:{value:t.formInline.code,callback:function(e){t.$set(t.formInline,"code",e)},expression:"formInline.code"}}),n("img",{staticClass:"pictrue",attrs:{src:t.imgcode},on:{click:t.captchas}})],1)]),n("FormItem",[n("Button",{staticClass:"btn",attrs:{type:"primary",long:"",loading:t.loading,size:"large"},on:{click:function(e){return t.handleSubmit("formInline")}}},[t._v("登录")])],1)],1)],1)],1),n("vcode",{attrs:{show:t.isShow,successText:"验证通过"},on:{success:function(e){return t.closeModel()},close:function(e){return t.closeModel()}}})],1)},o=[],s=n("c964"),a=(n("96cf"),n("b0c0"),n("ac1f"),n("5319"),n("5723")),r=n("42e3"),l=n("d708"),c=n("c276"),h=(n("7daa"),n("1069")),u=n.n(h),d={components:{Vcode:u.a},data:function(){return{fullWidth:document.documentElement.clientWidth,swiperOption:{pagination:".swiper-pagination",autoplay:!0},loading:!1,isShow:!1,autoLogin:!0,imgcode:"",formInline:{username:"",password:"",code:""},ruleInline:{username:[{required:!0,message:"请输入用户名",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}],code:[{required:!0,message:"请输入验证码",trigger:"blur"}]},errorNum:0,login_logo:"",swiperList:[],defaultSwiperList:n("433f"),key:""}},created:function(){var t=this;top!=window&&(top.location.href=location.href),document.onkeydown=function(e){if("login"===t.$route.name){var n=window.event.keyCode;13===n&&t.handleSubmit("formInline")}},window.addEventListener("resize",this.handleResize)},watch:{fullWidth:function(t){if(!this.timer){this.screenWidth=t,this.timer=!0;var e=this;setTimeout((function(){e.timer=!1}),400)}},$route:function(t){this.captchas()}},mounted:function(){var t=this;this.$nextTick((function(){t.screenWidth<768?document.getElementsByTagName("canvas")[0].removeAttribute("class","index_bg"):document.getElementsByTagName("canvas")[0].className="index_bg",t.swiperData()})),this.captchas()},methods:{swiperData:function(){var t=this;Object(a["c"])().then((function(e){localStorage.setItem("ADMIN_TITLE",e.data.site_name);var i=e.data||{};t.login_logo=i.login_logo?i.login_logo:n("9d64"),t.swiperList=i.slide.length?i.slide:[{slide:t.defaultSwiperList}],t.key=i.key})).catch((function(e){t.$Message.error(e),t.login_logo=n("9d64"),t.swiperList=[{slide:t.defaultSwiperList}]}))},closeModel:function(){var t=this;this.isShow=!1;var e=this.$Message.loading({content:"登录中...",duration:0});this.loading=!0,Object(a["a"])({account:this.formInline.username,pwd:this.formInline.password,imgcode:this.formInline.code,key:this.key}).then(function(){var n=Object(s["a"])(regeneratorRuntime.mark((function n(i){var o,s;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:e(),o=i.data,s=t.getExpiresTime(o.expires_time),Object(c["q"])("uuid",o.user_info.id,s),Object(c["q"])("token",o.token,s),Object(c["q"])("expires_time",o.expires_time,s),t.$store.commit("userInfo/uniqueAuth",o.unique_auth),t.$store.commit("userInfo/userInfo",o.user_info),t.$store.commit("menus/setopenMenus",[]),t.$store.commit("menus/getmenusNav",o.menus),t.$store.commit("userInfo/name",o.user_info.account),t.$store.commit("userInfo/avatar",o.user_info.head_pic),t.$store.commit("userInfo/access",o.unique_auth),t.$store.commit("userInfo/logo",o.logo),t.$store.commit("userInfo/logoSmall",o.logo_square),t.$store.commit("userInfo/version",o.version),t.$store.commit("userInfo/newOrderAudioLink",o.newOrderAudioLink);try{!1===o.queue&&t.$Notice.warning({title:"温馨提示",desc:"您的【消息队列】未开启,没有开启会导致异步任务无法执行。请尽快执行命令开启!!",duration:30}),!1===o.timer&&t.$Notice.warning({title:"温馨提示",desc:"您的【定时任务】未开启,没有开启会导致定时执行的任务无法执行。请尽快执行命令开启!!",duration:30}),t.checkSocket()}catch(a){}return n.abrupt("return",t.$router.replace({path:"/admin/home/"}));case 19:case"end":return n.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}()).catch((function(n){e(),t.formInline.code="";var i=void 0===n?{}:n;t.errorNum++,t.captchas(),t.$Message.error(i.msg||"登录失败")})),setTimeout((function(e){t.loading=!1}),1e3)},checkSocket:function(){var t=this;Object(r["n"])().then((function(e){var n=e.data.admin,i=!1,o=new WebSocket(n);o.onopen=function(){i=!0,o.close()},o.onerror=function(e){i||(i=!0,t.$Notice.warning({title:"温馨提示",desc:"您的【长连接】未开启,没有开启会导致客服消息无法发送,后台订单通知无法收到。请尽快执行命令开启!!",duration:30}))},o.onclose=function(e){i||(i=!0,t.$Notice.warning({title:"温馨提示",desc:"您的【长连接】未开启,没有开启会导致客服消息无法发送,后台订单通知无法收到。请尽快执行命令开启!!",duration:30}))}}))},getExpiresTime:function(t){var e=Math.round(new Date/1e3),n=t-e;return parseFloat(parseFloat(parseFloat(n/60)/60)/24)},closefail:function(){this.$Message.error("校验错误")},handleResize:function(t){this.fullWidth=document.documentElement.clientWidth,this.fullWidth<768?document.getElementsByTagName("canvas")[0].removeAttribute("class","index_bg"):document.getElementsByTagName("canvas")[0].className="index_bg"},captchas:function(){this.imgcode=l["a"].apiBaseURL+"/captcha_pro?"+Date.parse(new Date)},handleSubmit:function(t){var e=this;this.$refs[t].validate((function(t){t&&(e.errorNum>=2?e.isShow=!0:e.closeModel())}))}},beforeCreate:function(){this.fullWidth<768?document.getElementsByTagName("canvas")[0].removeAttribute("class","index_bg"):document.getElementsByTagName("canvas")[0].className="index_bg"},beforeDestroy:function(){window.removeEventListener("resize",this.handleResize),document.getElementsByTagName("canvas")[0].removeAttribute("class","index_bg")}},p=d,m=(n("c131"),n("2877")),f=Object(m["a"])(p,i,o,!1,null,"15838156",null);e["default"]=f.exports},"433f":function(t,e,n){t.exports=n.p+"img/sw.3ef10e8b.jpg"},"54c7":function(t,e,n){},"7daa":function(t,e,n){n("99af"),n("d3b7"),n("159b"),n("a434"),function(){function t(t,e,n){return t.getAttribute(e)||n}function e(t){return document.getElementsByTagName(t)}function n(){var n=e("script"),i=n.length,o=n[i-1];return{l:i,z:t(o,"zIndex",-2),o:t(o,"opacity",.8),c:t(o,"color","255,255,255"),n:t(o,"count",240)}}function i(){s=r.width=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a=r.height=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}function o(){if(u+=1,u<5)d(o);else{u=0,h.clearRect(0,0,s,a);var t,e,n,i,r,c,p=[m].concat(f);f.forEach((function(o){for(o.x+=o.xa,o.y+=o.ya,o.xa*=o.x>s||o.x<0?-1:1,o.ya*=o.y>a||o.y<0?-1:1,h.fillRect(o.x-.5,o.y-.5,2,2),h.fillStyle="#FFFFFF",e=0;e<p.length;e++)t=p[e],o!==t&&null!==t.x&&null!==t.y&&(i=o.x-t.x,r=o.y-t.y,c=i*i+r*r,c<t.max&&(t===m&&c>=t.max/2&&(o.x-=.03*i,o.y-=.03*r),n=(t.max-c)/t.max,h.beginPath(),h.lineWidth=n/2,h.strokeStyle="rgba("+l.c+","+(n+.2)+")",h.moveTo(o.x,o.y),h.lineTo(t.x,t.y),h.stroke()));p.splice(p.indexOf(o),1)})),d(o)}}var s,a,r=document.createElement("canvas"),l=n(),c="c_n"+l.l,h=r.getContext("2d"),u=0,d=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){window.setTimeout(t,1e3/45)},p=Math.random,m={x:null,y:null,max:2e4};r.id=c,r.style.cssText="position:fixed;top:0;left:0;z-index:"+l.z+";opacity:"+l.o,e("body")[0].appendChild(r),i(),window.onresize=i,window.onmousemove=function(t){t=t||window.event,m.x=t.clientX,m.y=t.clientY},window.onmouseout=function(){m.x=null,m.y=null};for(var f=[],g=0;l.n>g;g++){var v=p()*s,b=p()*a,w=2*p()-1,x=2*p()-1;f.push({x:v,y:b,xa:w,ya:x,max:6e3})}setTimeout((function(){o()}),100)}()},c131:function(t,e,n){"use strict";var i=n("54c7"),o=n.n(i);o.a}}]);