{"version":3,"sources":["webpack:///./src/views/login/index.vue?3874","webpack:///./src/api/common.js","webpack:///./node_modules/core-js/modules/_array-fill.js","webpack:///./node_modules/core-js/modules/es6.regexp.search.js","webpack:///./node_modules/core-js/modules/es6.array.fill.js","webpack:///./node_modules/core-js/modules/_same-value.js","webpack:///./src/views/login/index.vue?aa48","webpack:///./src/utils/open-window.js","webpack:///./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack:///./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack:///./src/views/login/ValidateCode/jigsaw.js","webpack:///src/views/login/index.vue","webpack:///./src/views/login/index.vue?66dc","webpack:///./src/views/login/index.vue"],"names":["fetchAllProductTypes","request","url","method","params","fetchProducts","product_type_id","spec_id","arguments","length","undefined","product_type","fetchProductParentSpecUnit","fetchAllProvinces","fetchAllProvincesCities","fetchAddressGeo","address_info","fetchLoginValidateToken","fetchAllCarBrands","data","fetchCarModels","carBrandId","toObject","toAbsoluteIndex","toLength","module","exports","value","O","this","aLen","index","end","endPos","anObject","sameValue","regExpExec","defined","SEARCH","$search","maybeCallNative","regexp","fn","call","RegExp","String","res","done","rx","S","previousLastIndex","lastIndex","result","$export","P","fill","Object","is","x","y","render","_vm","_h","$createElement","_c","_self","staticClass","_m","_v","ref","attrs","loginForm","loginRules","model","callback","$$v","$set","expression","key","passwordType","staticStyle","nativeOn","$event","type","indexOf","_k","keyCode","handleLogin","loading","preventDefault","validateCodeShow","handleValidateCodeShowClose","on","openValidateDialog","staticRenderFns","openWindow","title","w","h","dualScreenLeft","window","screenLeft","screen","left","dualScreenTop","screenTop","top","width","innerWidth","document","documentElement","clientWidth","height","innerHeight","clientHeight","newWindow","open","focus","_classCallCheck","instance","Constructor","TypeError","_defineProperties","target","props","i","descriptor","enumerable","configurable","writable","defineProperty","toPropertyKey","_createClass","protoProps","staticProps","prototype","l","r","PI","Math","L","getRandomNumberByRange","start","round","random","createCanvas","canvas","createElement","createImg","onload","img","Image","crossOrigin","onerror","setSrc","getRandomImgSrc","src","isIE","navigator","userAgent","xhr","XMLHttpRequest","onloadend","e","file","FileReader","readAsDataURL","response","responseType","send","tagName","className","element","setClass","addClass","classList","add","removeClass","remove","concat","drawPath","ctx","operation","beginPath","moveTo","arc","lineTo","lineWidth","fillStyle","strokeStyle","stroke","globalCompositeOperation","clip","sum","square","Jigsaw","_ref","el","_ref$width","_ref$height","onSuccess","onFail","onRefresh","assign","style","position","margin","initDOM","initImg","bindEvents","block","sliderContainer","pointerEvents","refreshIcon","sliderMask","slider","sliderIcon","text","innerHTML","loadingContainer","loadingIcon","loadingText","appendChild","canvasCtx","getContext","blockCtx","isLoading","display","_this","setLoading","draw","drawImage","ImageData","getImageData","putImageData","originX","originY","_this2","onselectstart","onclick","reset","trail","isMouseDown","handleDragStart","clientX","touches","clientY","handleDragMove","eventX","eventY","moveX","moveY","blockLeft","push","handleDragEnd","changedTouches","_this2$verify","verify","spliced","verified","setTimeout","bind","addEventListener","arr","average","reduce","deviations","map","stddev","sqrt","parseInt","abs","clearRect","init","opts","name","validateUsername","rule","validUsername","Error","validatePassword","validate_token","username","password","required","trigger","validator","redirect","dialogQrCode","validateCodeSuccess","watch","$route","handler","route","query","otherQuery","getOtherQuery","immediate","created","afterQRScan","destroyed","removeEventListener","methods","showPwd","$nextTick","$refs","validate","valid","console","log","dispatchLogin","_this3","$store","dispatch","then","$message","message","duration","$router","path","catch","handleQyWexinLogin","getCode","location","search","theRequest","str","substr","strs","split","unescape","sendCodeToServer","code","_this4","isQyWeixin","ua","toLowerCase","match","keys","acc","cur","wechatHandleClick","thirdpart","appid","agentid","redirect_uri","encodeURIComponent","origin","wechatAutoLogin","href","codeName","newValue","initValidate","jigsaw","getElementById","validateCodeSuccssCallBack","marginTop","clearValidate","div","hasChildNodes","removeChild","firstChild","_this5","isok","token","_asyncToGenerator","regeneratorRuntime","mark","_callee","wrap","_context","prev","next","stop","_this6","component"],"mappings":"kHAAA,W,kCCAA,kUAGO,SAASA,IACd,OAAOC,eAAQ,C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AAAqP,eAAA,2BACA,MAAAI,EAAAC,gBACAD,EAAAE,YAAAF,EAAAG,aAKAN,2BAAA,eAAAO,EAAA,KACAzV,iBAAAyS,MAAA,SAAA5Q,GACAA,EAAA6T,OACAD,EAAAnS,UAAAkN,eAAA3O,EAAA3B,KAAAyV,MACAF,EAAAzE,qBAAA,EACA7B,WAAAyG,eAAAC,mBAAAC,MAAA,SAAAC,IAAA,OAAAF,mBAAAG,MAAA,SAAAC,GAAA,eAAAA,EAAAC,KAAAD,EAAAE,MAAA,OACA,OAAAV,EAAA/Q,8BAAAuR,EAAAE,KAAA,EACAV,EAAApD,gBAAA,wBAAA4D,EAAAG,UAAAL,OACA,UAQArR,4BAAA,WACA,KAAAH,SAAA,EACA,KAAAE,kBAAA,EACA,KAAA2Q,iBAMAxQ,mBAAA,eAAAyR,EAAA,KACA,KAAAtE,WAAA,WACAsE,EAAAtB,qBCtT6V,I,wBCQzVuB,EAAY,eACd,EACA3T,EACAkC,GACA,EACA,KACA,KACA,MAIa,aAAAyR,E","file":"static/js/chunk-8af89958.d44c3fa6.js","sourcesContent":["export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=style&index=0&id=9e7400c4&prod&lang=scss\"","// 一些公共的API\r\nimport request from '@/utils/request'\r\n\r\nexport function fetchAllProductTypes() {\r\n return request({\r\n url: '/v1/admin_api/product/types',\r\n method: 'get',\r\n params: { }\r\n })\r\n}\r\n\r\nexport function fetchProducts(product_type_id, spec_id = -1) {\r\n return request({\r\n url: '/v1/admin_api/products',\r\n method: 'get',\r\n params: { product_type: product_type_id, spec_id: spec_id }\r\n })\r\n}\r\n\r\nexport function fetchProductParentSpecUnit(product_type_id) {\r\n return request({\r\n url: '/v1/admin_api/product/parent_unit',\r\n method: 'get',\r\n params: { 'product_type_id': product_type_id }\r\n })\r\n}\r\n\r\nexport function fetchAllProvinces() {\r\n return request({\r\n url: '/v1/admin_api/provinces',\r\n method: 'get',\r\n params: {}\r\n })\r\n}\r\n\r\nexport function fetchAllProvincesCities() {\r\n return request({\r\n url: '/v1/admin_api/provincesWithCities',\r\n method: 'get',\r\n params: {}\r\n })\r\n}\r\n\r\nexport function fetchAddressGeo(address_info) {\r\n return request({\r\n url: '/v1/third_api/baidu/geo',\r\n method: 'get',\r\n params: { 'address_info': address_info }\r\n })\r\n}\r\n\r\nexport function fetchLoginValidateToken() {\r\n return request({\r\n url: '/v1/admin_api/login/validate_token',\r\n method: 'get',\r\n params: { }\r\n })\r\n}\r\n\r\nexport function fetchAllCarBrands() {\r\n return request({\r\n url: '/v1/api/car/brands',\r\n method: 'post',\r\n data: {}\r\n })\r\n}\r\n\r\nexport function fetchCarModels(carBrandId) {\r\n return request({\r\n url: '/v1/api/car/models',\r\n method: 'post',\r\n data: { 'car_brand_id': carBrandId }\r\n })\r\n}\r\n","// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)\n'use strict';\nvar toObject = require('./_to-object');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nvar toLength = require('./_to-length');\nmodule.exports = function fill(value /* , start = 0, end = @length */) {\n var O = toObject(this);\n var length = toLength(O.length);\n var aLen = arguments.length;\n var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length);\n var end = aLen > 2 ? arguments[2] : undefined;\n var endPos = end === undefined ? length : toAbsoluteIndex(end, length);\n while (endPos > index) O[index++] = value;\n return O;\n};\n","'use strict';\n\nvar anObject = require('./_an-object');\nvar sameValue = require('./_same-value');\nvar regExpExec = require('./_regexp-exec-abstract');\n\n// @@search logic\nrequire('./_fix-re-wks')('search', 1, function (defined, SEARCH, $search, maybeCallNative) {\n return [\n // `String.prototype.search` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.search\n function search(regexp) {\n var O = defined(this);\n var fn = regexp == undefined ? undefined : regexp[SEARCH];\n return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));\n },\n // `RegExp.prototype[@@search]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search\n function (regexp) {\n var res = maybeCallNative($search, regexp, this);\n if (res.done) return res.value;\n var rx = anObject(regexp);\n var S = String(this);\n var previousLastIndex = rx.lastIndex;\n if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;\n var result = regExpExec(rx, S);\n if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;\n return result === null ? -1 : result.index;\n }\n ];\n});\n","// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)\nvar $export = require('./_export');\n\n$export($export.P, 'Array', { fill: require('./_array-fill') });\n\nrequire('./_add-to-unscopables')('fill');\n","// 7.2.9 SameValue(x, y)\nmodule.exports = Object.is || function is(x, y) {\n // eslint-disable-next-line no-self-compare\n return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;\n};\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"login-container\"},[_c('div',{staticClass:\"form-area\"},[_c('div',{staticClass:\"form-area-box\"},[_vm._m(0),_vm._v(\" \"),_c('el-form',{ref:\"loginForm\",staticClass:\"login-form\",attrs:{\"model\":_vm.loginForm,\"rules\":_vm.loginRules,\"auto-complete\":\"on\",\"label-position\":\"left\"}},[_c('el-form-item',{attrs:{\"prop\":\"username\"}},[_c('el-input',{ref:\"username\",attrs:{\"size\":\"large\",\"prefix-icon\":\"el-icon-user-solid\",\"placeholder\":\"用户名\",\"name\":\"username\",\"type\":\"text\",\"tabindex\":\"1\",\"auto-complete\":\"on\"},model:{value:(_vm.loginForm.username),callback:function ($$v) {_vm.$set(_vm.loginForm, \"username\", $$v)},expression:\"loginForm.username\"}})],1),_vm._v(\" \"),_c('el-form-item',{attrs:{\"prop\":\"password\"}},[_c('el-input',{key:_vm.passwordType,ref:\"password\",staticStyle:{\"background-color\":\"transparent!important\"},attrs:{\"size\":\"large\",\"prefix-icon\":\"el-icon-key\",\"type\":_vm.passwordType,\"placeholder\":\"密码\",\"name\":\"password\",\"tabindex\":\"2\",\"auto-complete\":\"on\"},nativeOn:{\"keyup\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\")){ return null; }return _vm.handleLogin($event)}},model:{value:(_vm.loginForm.password),callback:function ($$v) {_vm.$set(_vm.loginForm, \"password\", $$v)},expression:\"loginForm.password\"}})],1),_vm._v(\" \"),_c('el-button',{staticStyle:{\"width\":\"100%\",\"margin-bottom\":\"20px\",\"padding\":\"15px\"},attrs:{\"loading\":_vm.loading,\"type\":\"primary\"},nativeOn:{\"click\":function($event){$event.preventDefault();return _vm.handleLogin($event)}}},[_vm._v(\"登录系统\")])],1),_vm._v(\" \"),_vm._m(1)],1)]),_vm._v(\" \"),_c('el-dialog',{attrs:{\"title\":\"YEECAR · 登陆滑块验证\",\"width\":\"440px\",\"modal\":false,\"visible\":_vm.validateCodeShow,\"before-close\":_vm.handleValidateCodeShowClose},on:{\"update:visible\":function($event){_vm.validateCodeShow=$event},\"open\":_vm.openValidateDialog}},[_c('div',{attrs:{\"id\":\"validate-code-container\"}})])],1)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"title-container\"},[_c('h3',{staticClass:\"title\"},[_vm._v(\"YEECAR汽车膜质保管理系统\")]),_vm._v(\" \"),_c('p',{staticClass:\"sub-title\"},[_vm._v(\"用户登录\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"footer-area\"},[_c('p',{staticStyle:{\"text-align\":\"center\"}},[_vm._v(\"Copyright © 2021-2024 YEECAR All Rights Reserved.\")])])}]\n\nexport { render, staticRenderFns }","/**\r\n *Created by PanJiaChen on 16/11/29.\r\n * @param {Sting} url\r\n * @param {Sting} title\r\n * @param {Number} w\r\n * @param {Number} h\r\n */\r\nexport default function openWindow(url, title, w, h) {\r\n // Fixes dual-screen position Most browsers Firefox\r\n const dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : screen.left\r\n const dualScreenTop = window.screenTop !== undefined ? window.screenTop : screen.top\r\n\r\n const width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width\r\n const height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height\r\n\r\n const left = ((width / 2) - (w / 2)) + dualScreenLeft\r\n const top = ((height / 2) - (h / 2)) + dualScreenTop\r\n const newWindow = window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left)\r\n\r\n // Puts focus on the newWindow\r\n if (window.focus) {\r\n newWindow.focus()\r\n }\r\n}\r\n\r\n","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","import './jigsaw.css'\r\n\r\nconst w = 310 // canvas宽度\r\nconst h = 155 // canvas高度\r\nconst l = 42 // 滑块边长\r\nconst r = 9 // 滑块半径\r\nconst PI = Math.PI\r\nconst L = l + r * 2 + 3 // 滑块实际边长\r\n\r\nfunction getRandomNumberByRange(start, end) {\r\n return Math.round(Math.random() * (end - start) + start)\r\n}\r\n\r\nfunction createCanvas(width, height) {\r\n const canvas = document.createElement('canvas')\r\n canvas.width = width\r\n canvas.height = height\r\n return canvas\r\n}\r\n\r\nfunction createImg(onload) {\r\n const img = new Image()\r\n img.crossOrigin = 'Anonymous'\r\n img.onload = onload\r\n img.onerror = () => {\r\n img.setSrc(getRandomImgSrc()) // 图片加载失败的时候重新加载其他图片\r\n }\r\n\r\n img.setSrc = function(src) {\r\n const isIE = window.navigator.userAgent.indexOf('Trident') > -1\r\n if (isIE) { // IE浏览器无法通过img.crossOrigin跨域,使用ajax获取图片blob然后转为dataURL显示\r\n const xhr = new XMLHttpRequest()\r\n xhr.onloadend = function(e) {\r\n const file = new FileReader() // FileReader仅支持IE10+\r\n file.readAsDataURL(e.target.response)\r\n file.onloadend = function(e) {\r\n img.src = e.target.result\r\n }\r\n }\r\n xhr.open('GET', src)\r\n xhr.responseType = 'blob'\r\n xhr.send()\r\n } else img.src = src\r\n }\r\n\r\n img.setSrc(getRandomImgSrc())\r\n return img\r\n}\r\n\r\nfunction createElement(tagName, className) {\r\n const element = document.createElement(tagName)\r\n className && (element.className = className)\r\n return element\r\n}\r\n\r\nfunction setClass(element, className) {\r\n element.className = className\r\n}\r\n\r\nfunction addClass(element, className) {\r\n element.classList.add(className)\r\n}\r\n\r\nfunction removeClass(element, className) {\r\n element.classList.remove(className)\r\n}\r\n\r\nfunction getRandomImgSrc() {\r\n return `https://e.yeecar.com.cn/v1/third_api/encrypt/picture/${getRandomNumberByRange(0, 1084)}/${w}/${h}`\r\n}\r\n\r\nfunction drawPath(ctx, x, y, operation) {\r\n ctx.beginPath()\r\n ctx.moveTo(x, y)\r\n ctx.arc(x + l / 2, y - r + 2, r, 0.72 * PI, 2.26 * PI)\r\n ctx.lineTo(x + l, y)\r\n ctx.arc(x + l + r - 2, y + l / 2, r, 1.21 * PI, 2.78 * PI)\r\n ctx.lineTo(x + l, y + l)\r\n ctx.lineTo(x, y + l)\r\n ctx.arc(x + r - 2, y + l / 2, r + 0.4, 2.76 * PI, 1.24 * PI, true)\r\n ctx.lineTo(x, y)\r\n ctx.lineWidth = 2\r\n ctx.fillStyle = 'rgba(255, 255, 255, 0.7)'\r\n ctx.strokeStyle = 'rgba(255, 255, 255, 0.7)'\r\n ctx.stroke()\r\n ctx.globalCompositeOperation = 'destination-over'\r\n operation === 'fill' ? ctx.fill() : ctx.clip()\r\n}\r\n\r\nfunction sum(x, y) {\r\n return x + y\r\n}\r\n\r\nfunction square(x) {\r\n return x * x\r\n}\r\n\r\nclass Jigsaw {\r\n constructor({ el, width = w, height = h, onSuccess, onFail, onRefresh }) {\r\n Object.assign(el.style, {\r\n position: 'relative',\r\n width: width + 'px',\r\n margin: '0 auto'\r\n })\r\n this.width = width\r\n this.height = height\r\n this.el = el\r\n this.onSuccess = onSuccess\r\n this.onFail = onFail\r\n this.onRefresh = onRefresh\r\n }\r\n\r\n init() {\r\n this.initDOM()\r\n this.initImg()\r\n this.bindEvents()\r\n }\r\n\r\n initDOM() {\r\n const { width, height } = this\r\n const canvas = createCanvas(width, height) // 画布\r\n const block = createCanvas(width, height) // 滑块\r\n setClass(block, 'block')\r\n const sliderContainer = createElement('div', 'sliderContainer')\r\n sliderContainer.style.width = width + 'px'\r\n sliderContainer.style.pointerEvents = 'none'\r\n const refreshIcon = createElement('div', 'refreshIcon')\r\n const sliderMask = createElement('div', 'sliderMask')\r\n const slider = createElement('div', 'slider')\r\n const sliderIcon = createElement('span', 'sliderIcon')\r\n const text = createElement('span', 'sliderText')\r\n text.innerHTML = '向右滑动填充拼图'\r\n\r\n // 增加loading\r\n const loadingContainer = createElement('div', 'loadingContainer')\r\n loadingContainer.style.width = width + 'px'\r\n loadingContainer.style.height = height + 'px'\r\n const loadingIcon = createElement('div', 'loadingIcon')\r\n const loadingText = createElement('span')\r\n loadingText.innerHTML = '加载中...'\r\n loadingContainer.appendChild(loadingIcon)\r\n loadingContainer.appendChild(loadingText)\r\n\r\n const el = this.el\r\n el.appendChild(loadingContainer)\r\n el.appendChild(canvas)\r\n el.appendChild(refreshIcon)\r\n el.appendChild(block)\r\n slider.appendChild(sliderIcon)\r\n sliderMask.appendChild(slider)\r\n sliderContainer.appendChild(sliderMask)\r\n sliderContainer.appendChild(text)\r\n el.appendChild(sliderContainer)\r\n\r\n Object.assign(this, {\r\n canvas,\r\n block,\r\n sliderContainer,\r\n loadingContainer,\r\n refreshIcon,\r\n slider,\r\n sliderMask,\r\n sliderIcon,\r\n text,\r\n canvasCtx: canvas.getContext('2d'),\r\n blockCtx: block.getContext('2d')\r\n })\r\n }\r\n\r\n setLoading(isLoading) {\r\n this.loadingContainer.style.display = isLoading ? '' : 'none'\r\n this.sliderContainer.style.pointerEvents = isLoading ? 'none' : ''\r\n }\r\n\r\n initImg() {\r\n const img = createImg(() => {\r\n this.setLoading(false)\r\n this.draw(img)\r\n })\r\n this.img = img\r\n }\r\n\r\n draw(img) {\r\n const { width, height } = this\r\n // 随机位置创建拼图形状\r\n this.x = getRandomNumberByRange(L + 10, width - (L + 10))\r\n this.y = getRandomNumberByRange(10 + r * 2, height - (L + 10))\r\n drawPath(this.canvasCtx, this.x, this.y, 'fill')\r\n drawPath(this.blockCtx, this.x, this.y, 'clip')\r\n\r\n // 画入图片\r\n this.canvasCtx.drawImage(img, 0, 0, width, height)\r\n this.blockCtx.drawImage(img, 0, 0, width, height)\r\n\r\n // 提取滑块并放到最左边\r\n const y = this.y - r * 2 - 1\r\n const ImageData = this.blockCtx.getImageData(this.x - 3, y, L, L)\r\n this.block.width = L\r\n this.blockCtx.putImageData(ImageData, 0, y)\r\n }\r\n\r\n bindEvents() {\r\n this.el.onselectstart = () => false\r\n this.refreshIcon.onclick = () => {\r\n this.reset()\r\n typeof this.onRefresh === 'function' && this.onRefresh()\r\n }\r\n\r\n let originX; let originY; const trail = []; let isMouseDown = false\r\n\r\n const handleDragStart = function(e) {\r\n originX = e.clientX || e.touches[0].clientX\r\n originY = e.clientY || e.touches[0].clientY\r\n isMouseDown = true\r\n }\r\n const width = this.width\r\n const handleDragMove = (e) => {\r\n if (!isMouseDown) return false\r\n e.preventDefault()\r\n const eventX = e.clientX || e.touches[0].clientX\r\n const eventY = e.clientY || e.touches[0].clientY\r\n const moveX = eventX - originX\r\n const moveY = eventY - originY\r\n if (moveX < 0 || moveX + 38 >= width) return false\r\n this.slider.style.left = moveX + 'px'\r\n const blockLeft = (width - 40 - 20) / (width - 40) * moveX\r\n this.block.style.left = blockLeft + 'px'\r\n\r\n addClass(this.sliderContainer, 'sliderContainer_active')\r\n this.sliderMask.style.width = moveX + 'px'\r\n trail.push(moveY)\r\n }\r\n\r\n const handleDragEnd = (e) => {\r\n if (!isMouseDown) return false\r\n isMouseDown = false\r\n const eventX = e.clientX || e.changedTouches[0].clientX\r\n if (eventX === originX) return false\r\n removeClass(this.sliderContainer, 'sliderContainer_active')\r\n this.trail = trail\r\n const { spliced, verified } = this.verify()\r\n if (spliced) {\r\n if (verified) {\r\n addClass(this.sliderContainer, 'sliderContainer_success')\r\n typeof this.onSuccess === 'function' && this.onSuccess()\r\n } else {\r\n addClass(this.sliderContainer, 'sliderContainer_fail')\r\n this.text.innerHTML = '请再试一次'\r\n this.reset()\r\n }\r\n } else {\r\n addClass(this.sliderContainer, 'sliderContainer_fail')\r\n typeof this.onFail === 'function' && this.onFail()\r\n setTimeout(this.reset.bind(this), 1000)\r\n }\r\n }\r\n this.slider.addEventListener('mousedown', handleDragStart)\r\n this.slider.addEventListener('touchstart', handleDragStart)\r\n this.block.addEventListener('mousedown', handleDragStart)\r\n this.block.addEventListener('touchstart', handleDragStart)\r\n document.addEventListener('mousemove', handleDragMove)\r\n document.addEventListener('touchmove', handleDragMove)\r\n document.addEventListener('mouseup', handleDragEnd)\r\n document.addEventListener('touchend', handleDragEnd)\r\n }\r\n\r\n verify() {\r\n const arr = this.trail // 拖动时y轴的移动距离\r\n const average = arr.reduce(sum) / arr.length\r\n const deviations = arr.map(x => x - average)\r\n const stddev = Math.sqrt(deviations.map(square).reduce(sum) / arr.length)\r\n const left = parseInt(this.block.style.left)\r\n return {\r\n spliced: Math.abs(left - this.x) < 10,\r\n verified: stddev !== 0 // 简单验证拖动轨迹,为零时表示Y轴上下没有波动,可能非人为操作\r\n }\r\n }\r\n\r\n reset() {\r\n const { width, height } = this\r\n // 重置样式\r\n setClass(this.sliderContainer, 'sliderContainer')\r\n this.slider.style.left = 0 + 'px'\r\n this.block.width = width\r\n this.block.style.left = 0 + 'px'\r\n this.sliderMask.style.width = 0 + 'px'\r\n\r\n // 清空画布\r\n this.canvasCtx.clearRect(0, 0, width, height)\r\n this.blockCtx.clearRect(0, 0, width, height)\r\n\r\n // 重新加载图片\r\n this.setLoading(true)\r\n this.img.setSrc(getRandomImgSrc())\r\n }\r\n}\r\n\r\nexport default {\r\n init: function(opts) {\r\n return new Jigsaw(opts).init()\r\n }\r\n}\r\n\r\n","\r\n \r\n \r\n \r\n \r\n YEECAR汽车膜质保管理系统\r\n 用户登录\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n 登录系统\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=9e7400c4\"\nimport script from \"./index.vue?vue&type=script&lang=js\"\nexport * from \"./index.vue?vue&type=script&lang=js\"\nimport style0 from \"./index.vue?vue&type=style&index=0&id=9e7400c4&prod&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}
用户登录