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.
1 lines
36 KiB
1 lines
36 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-23527410"],{1069:function(t,e,n){t.exports=function(){"use strict";var t={358:function(t,e,n){var i=n(81),a=n.n(i),s=n(645),o=n.n(s)()(a());o.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=o},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,a,s){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(i)for(var r=0;r<this.length;r++){var c=this[r][0];null!=c&&(o[c]=!0)}for(var l=0;l<t.length;l++){var h=[].concat(t[l]);i&&o[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),a&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=a):h[4]="".concat(a)),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={},o=[],r=0;r<t.length;r++){var c=t[r],l=i.base?c[0]+i.base:c[0],h=s[l]||0,u="".concat(l," ").concat(h);s[l]=h+1;var d=n(u),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)e[d].references++,e[d].updater(p);else{var f=a(p,i);i.byIndex=r,e.splice(r,0,{identifier:u,updater:f,references:1})}o.push(u)}return o}function a(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,a){var s=i(t=t||[],a=a||{});return function(t){t=t||[];for(var o=0;o<s.length;o++){var r=n(s[o]);e[r].references--}for(var c=i(t,a),l=0;l<s.length;l++){var h=n(s[l]);0===e[h].references&&(e[h].updater(),e.splice(h,1))}s=c}}},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 a=void 0!==n.layer;a&&(i+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),i+=n.css,a&&(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 a=e[i];if(void 0!==a)return a.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 y}});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||this.isSubmting||(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,a=e.getContext("2d"),s=n.getContext("2d"),o=i.getContext("2d"),r=navigator.userAgent.indexOf("Firefox")>=0&&navigator.userAgent.indexOf("Windows")>=0,c=document.createElement("img");if(a.fillStyle="rgba(255,255,255,1)",o.fillStyle="rgba(255,255,255,1)",a.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),c.crossOrigin="anonymous",c.onload=()=>{const[t,e,n,i]=this.makeImgSize(c);a.save(),this.paintBrick(a),a.closePath(),r?(a.clip(),a.save(),a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowColor="#000",a.shadowBlur=3,a.fill(),a.restore()):(a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowColor="#000",a.shadowBlur=3,a.fill(),a.clip()),a.drawImage(c,t,e,n,i),o.fillRect(0,0,this.canvasWidth,this.canvasHeight),o.drawImage(c,t,e,n,i),a.globalCompositeOperation="source-atop",this.paintBrick(a),a.arc(this.pinX+Math.ceil(this.puzzleBaseSize/2),this.pinY+Math.ceil(this.puzzleBaseSize/2),1.2*this.puzzleBaseSize,0,2*Math.PI,!0),a.closePath(),a.shadowColor="rgba(255, 255, 255, .8)",a.shadowOffsetX=-1,a.shadowOffsetY=-1,a.shadowBlur=Math.min(Math.ceil(8*this.puzzleScale),12),a.fillStyle="#ffffaa",a.fill();const l=a.getImageData(this.pinX-3,this.pinY-20,this.pinX+this.puzzleBaseSize+5,this.pinY+this.puzzleBaseSize+5);s.putImageData(l,0,this.pinY-20),a.restore(),a.clearRect(0,0,this.canvasWidth,this.canvasHeight),a.save(),this.paintBrick(a),a.globalAlpha=.8,a.fillStyle="#ffffff",a.fill(),a.restore(),a.save(),a.globalCompositeOperation="source-atop",this.paintBrick(a),a.arc(this.pinX+Math.ceil(this.puzzleBaseSize/2),this.pinY+Math.ceil(this.puzzleBaseSize/2),1.2*this.puzzleBaseSize,0,2*Math.PI,!0),a.shadowColor="#000",a.shadowOffsetX=2,a.shadowOffsetY=2,a.shadowBlur=16,a.fill(),a.restore(),a.save(),a.globalCompositeOperation="destination-over",a.drawImage(c,t,e,n,i),a.restore(),this.loading=!1,this.isCanSlide=!0},c.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,c.src=this.imgs[t]}else c.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,a=0,s=0;return e>this.canvasWidth/this.canvasHeight?(s=this.canvasHeight,a=e*s,i=0,n=(this.canvasWidth-a)/2):(a=this.canvasWidth,s=a/e,n=0,i=(this.canvasHeight-s)/2),[n,i,a,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())}}},a=n(379),s=n.n(a),o=n(795),r=n.n(o),c=n(569),l=n.n(c),h=n(565),u=n.n(h),d=n(216),p=n.n(d),f=n(589),g=n.n(f),v=n(358),m={};m.styleTagTransform=g(),m.setAttributes=u(),m.insert=l().bind(null,"head"),m.domAPI=r(),m.insertStyleElement=p(),s()(v.Z,m),v.Z&&v.Z.locals&&v.Z.locals;var b=function(t,e,n,i,a,s,o,r){var c="function"==typeof t?t.options:t;return 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),{exports:t,options:c}}(e,t);b.options.__file="src/app.vue";var y=b.exports}(),i}()},3008:function(t,e,n){},"460f":function(t,e,n){"use strict";n("5930")},5613:function(t,e,n){"use strict";var i={name:"lookImage",props:{imageUrl:{type:String,default:""},styleImg:{type:String,default:""},title:{type:String,default:"查看图片"}},data:function(){return{visible:!1}},methods:{clear:function(){this.visible=!1},open:function(){this.visible=!0}}},a=(n("460f"),n("2877")),s=Object(a.a)(i,(function(){var t=this,e=t._self._c;return e("Modal",{attrs:{title:t.title,"footer-hide":""},model:{value:t.visible,callback:function(e){t.visible=e},expression:"visible"}},[e("div",{staticClass:"image"},[t.visible?e("img",{style:t.styleImg?t.styleImg:"width: 100%;",attrs:{src:t.imageUrl}}):t._e()]),e("div",{attrs:{slot:"footer"},slot:"footer"})])}),[],!1,null,"9a098c1c",null);e.a=s.exports},5930:function(t,e,n){},"61f7":function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var a=n.call(t,e||"default");if("object"!=i(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==i(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t,e){/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var n={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(var i in n)if(new RegExp("(".concat(i,")")).test(e)){var a=n[i]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?a:c(a))}return e}function c(t){return("00"+t).substr(t.length)}n.d(e,"a",(function(){return r})),n.d(e,"c",(function(){return u})),n.d(e,"b",(function(){return d}));var l={min:"%s最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"},h=function(t,e){t.message=function(t){return e.replace("%s",t||"")}};function u(t){return s({required:!0,message:t,type:"string"},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function d(t){return p.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,t)}h(u,"请输入%s"),h(d,"%s格式不正确");var p=Object.keys(l).reduce((function(t,e){return t[e]=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a="range"===e?{min:t[0],max:t[1]}:o({},e,t);return s(s({message:n.replace(":".concat(e),"range"===e?"".concat(t[0],"-").concat(t[1]):t),type:"string"},a),i)},h(t[e],l[e]),t}),{})},c2b5:function(t,e,n){"use strict";n.r(e);var i=n("d708"),a=n("b0e7"),s=n("5613"),o=n("8593"),r=n("2f62"),c=n("61f7"),l=(n("d044"),n("1069")),h=n.n(l);function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?d(Object(n),!0).forEach((function(e){f(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function f(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=u(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=u(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==u(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var g={name:"system_auth",computed:p(p(p({},Object(r.e)("admin/layout",["isMobile"])),Object(r.e)("admin/userLevel",["categoryId"])),{},{labelWidth:function(){return this.isMobile?void 0:85},labelPosition:function(){return this.isMobile?"top":"right"}}),data:function(){return{baseURLS:i.a.apiBaseURL.replace(/adminapi/,""),baseUrl:"https://shop.RENZHOU.net/html/index.html",iframeUrl:"",captchs:"http://authorize.RENZHOU.net/api/captchs/",authCode:"",status:1,dayNum:0,copyright:"",isTemplate:!1,price:"",proPrice:"",productStatus:!1,copyrightText:"",success:!1,payType:"",disabled:!1,isShow:!1,active:0,timer:null,version:"",label:"",productType:"",modalPic:!1,isChoice:"单选",authorizedPicture:"",gridPic:{xl:6,lg:8,md:12,sm:12,xs:12},gridBtn:{xl:4,lg:8,md:8,sm:8,xs:8}}},filters:{formatDate:function(t){if(0!==t){var e=new Date(1e3*t);return Object(c.a)(e,"yyyy-MM-dd hh:mm")}}},components:{Vcode:h.a,uploadPictures:a.a,lookImage:s.a},mounted:function(){var t=this;this.getAuth(),this.getVersion(),window.addEventListener("message",(function(e){"onCancel"===e.data.event&&t.cancel()}))},methods:{modalDel:function(){this.authorizedPicture=""},handleView:function(){this.$refs.lookImage.open()},getVersion:function(){var t=this;Object(o.x)().then((function(e){t.version=e.data.version,t.label=e.data.label}))},getRENZHOUCopyRight:function(){var t=this;Object(o.a)().then((function(e){t.getAuth()}))},saveCopyRight:function(){var t=this;Object(o.P)({copyright:this.copyrightText,copyright_img:this.authorizedPicture}).then((function(e){return t.$Message.success(e.msg)}))},modalPicTap:function(){this.modalPic=!0},getPic:function(t){this.authorizedPicture=t.att_dir,this.modalPic=!1},getCopyRight:function(){var t=this;Object(o.w)().then((function(e){t.copyrightText=e.data.copyrightContext||"",t.authorizedPicture=e.data.copyrightImage||""}))},cancel:function(){"copyright"===this.productType?this.getRENZHOUCopyRight():this.getAuth(),this.iframeUrl="",this.isTemplate=!1},loginTabSwitch:function(t){this.active=t},getAuth:function(){var t=this;Object(o.c)().then((function(e){var n=e.data||{};t.authCode=n.authCode||"",t.status=void 0===n.status?-1:n.status,t.dayNum=n.day||0,t.copyright=n.copyright,t.copyright&&t.getCopyRight()})).catch((function(e){t.$Message.error(e.msg)}))},toRENZHOU:function(){window.open("http://www.RENZHOU.com")},getProduct:function(){var t=this;Object(o.b)({type:"copyright"}).then((function(e){t.price=e.data.attr.price,t.productStatus=!0})).catch((function(e){t.$Message.error(e.msg)})),Object(o.b)({type:"pro"}).then((function(e){t.proPrice=e.data.attr.price})).catch((function(e){t.$Message.error(e.msg)}))},payment:function(t){this.productType=t;var e=location.host,n=e.split(".");"test"===n[0]&&4===n.length?e=e.replace("test.",""):"www"===n[0]&&3===n.length&&(e=e.replace("www.","")),this.iframeUrl=this.baseUrl+"?url="+e+"&product="+t+"&version="+this.version+"&label="+this.label,this.isTemplate=!0},onClose:function(){this.isShow=!1}},destroyed:function(){}},v=(n("e993"),n("2877")),m=Object(v.a)(g,(function(){var t=this,e=t._self._c;return e("div",[e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[e("div",{staticClass:"auth acea-row row-between-wrapper"},[e("div",{staticClass:"acea-row row-middle"},[e("Icon",{staticClass:"iconIos blue",attrs:{type:"ios-bulb-outline"}}),-1===t.status||-9===t.status?e("div",{staticClass:"text"},[e("div",[t._v("体验时间剩余 "+t._s(t.dayNum)+"天")]),e("div",{staticClass:"code"},[t._v("\n 到期后后台将不能正常使用,如果您对我们的系统满意,请支持正版! \n ")])]):2===t.status?e("div",{staticClass:"text"},[e("div",[t._v("体验时间剩余 "+t._s(t.dayNum)+"天")]),e("div",{staticClass:"code red"},[t._v("审核未通过")])]):1===t.status?e("div",{staticClass:"text"},[e("div",[t._v("商业授权")]),e("div",{staticClass:"code"},[t._v("授权码:"+t._s(t.authCode))])]):0===t.status?e("div",{staticClass:"text"},[e("div",[t._v("体验时间剩余 "+t._s(t.dayNum)+"天")]),e("div",{staticClass:"code blue"},[t._v("授权申请已提交,请等待审核")])]):t._e()],1),e("div",[1===t.status?e("Button",{on:{click:function(e){return t.toRENZHOU()}}},[t._v("进入官网")]):-1===t.status||-9===t.status?e("Button",{attrs:{type:"primary"},on:{click:function(e){return t.payment("pro")}}},[t._v("申请授权\n ")]):2===t.status?e("Button",{attrs:{type:"primary"},on:{click:function(e){return t.payment("pro")}}},[t._v("重新申请")]):0===t.status?e("Button",{staticClass:"grey"},[t._v("审核中")]):t._e(),1!==t.status?e("Button",{staticClass:"ml20",on:{click:function(e){return t.payment("pro")}}},[t._v("购买授权")]):t._e()],1)])]),t.copyright||1!=t.status?t._e():e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[e("div",{staticClass:"auth acea-row row-between-wrapper"},[e("div",{staticClass:"acea-row row-middle"},[e("span",{staticClass:"iconfont iconbanquan iconIos blue"}),e("div",{staticClass:"text"},[e("div",[t._v("去版权服务")]),e("div",{staticClass:"code"},[t._v("购买之后可以设置")]),t.productStatus?e("div",{staticClass:"pro_price"},[t._v("¥"+t._s(t.price))]):t._e()])]),e("Button",{attrs:{type:"primary"},on:{click:function(e){return t.payment("copyright")}}},[t._v("立即购买")])],1)]),t.copyright?e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[e("div",{staticClass:"auth acea-row row-between-wrapper"},[e("div",{staticClass:"acea-row row-middle"},[e("span",{staticClass:"iconfont iconbanquan iconIos blue"}),e("div",{staticClass:"acea-row row-middle"},[e("span",{staticClass:"update"},[t._v("修改授权信息:")]),e("Input",{staticStyle:{width:"460px"},model:{value:t.copyrightText,callback:function(e){t.copyrightText=e},expression:"copyrightText"}})],1)]),e("Button",{attrs:{type:"primary"},on:{click:t.saveCopyRight}},[t._v("保存")])],1),e("div",{staticClass:"authorized"},[e("div",[e("span",{staticClass:"update"},[t._v("上传授权图片:")])]),t.authorizedPicture?e("div",{staticClass:"uploadPictrue"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.authorizedPicture,expression:"authorizedPicture"}]}),e("div",{staticClass:"picCover"},[e("Icon",{attrs:{type:"ios-eye-outline"},nativeOn:{click:function(e){return t.handleView.apply(null,arguments)}}}),e("Icon",{attrs:{type:"ios-trash-outline"},nativeOn:{click:function(e){return t.modalDel.apply(null,arguments)}}})],1)]):e("div",{staticClass:"upload",on:{click:function(e){return t.modalPicTap("单选")}}},[e("div",{staticClass:"iconfont"},[t._v("+")])])]),e("span",{staticClass:"prompt"},[t._v("建议尺寸:宽290px*高100px\n "),e("Poptip",{attrs:{placement:"bottom",trigger:"hover",width:"256",transfer:!0,padding:"8px"}},[e("a",[t._v("查看示例")]),e("div",{staticClass:"exampleImg",attrs:{slot:"content"},slot:"content"},[e("img",{attrs:{src:"".concat(t.baseURLS,"/statics/system/mobileAuth.png"),alt:""}})])])],1)]):t._e(),e("Modal",{attrs:{scrollable:"","footer-hide":"",closable:"",title:"商业授权","z-index":1,width:"447"},on:{"on-cancel":t.cancel},model:{value:t.isTemplate,callback:function(e){t.isTemplate=e},expression:"isTemplate"}},[e("iframe",{attrs:{width:"100%",height:"580",src:t.iframeUrl,frameborder:"0"}})]),e("Modal",{attrs:{width:"960px",scrollable:"","footer-hide":"",closable:"",title:"上传授权图片","mask-closable":!1,"z-index":1},model:{value:t.modalPic,callback:function(e){t.modalPic=e},expression:"modalPic"}},[t.modalPic?e("uploadPictures",{attrs:{isChoice:t.isChoice,gridBtn:t.gridBtn,gridPic:t.gridPic},on:{getPic:t.getPic}}):t._e()],1),e("look-image",{ref:"lookImage",attrs:{imageUrl:t.authorizedPicture}})],1)}),[],!1,null,"886f3dbc",null);e.default=m.exports},e993:function(t,e,n){"use strict";n("3008")}}]); |