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.
jiaojiu/dist/js/chunk-315f5c4a.c64363f3.js.map

1 line
16 KiB

{"version":3,"sources":["webpack:///./src/views/login/Iphone.vue?c74c","webpack:///src/views/login/Iphone.vue","webpack:///./src/views/login/Iphone.vue?5f33","webpack:///./src/views/login/Iphone.vue","webpack:///./node_modules/core-js/modules/es.function.name.js","webpack:///./src/views/login/Iphone.vue?3caf"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","on","backClick","attrs","_v","_m","ref","verifyForm","verifyFormRules","model","value","callback","$$v","$set","expression","emitsmsverify","login","staticRenderFns","name","components","data","checkphone","Error","iphone","code","methods","emitsms","btn","setAttribute","time","localtime","style","color","borderColor","backgroundColor","innerHTML","window","sessionStorage","setItem","clearInterval","timer","disabled","isCellPhone","test","val","$router","push","$refs","verifyFormRef","validate","mounted","onresize","localtimer","component","DESCRIPTORS","defineProperty","f","FunctionPrototype","Function","prototype","FunctionPrototypeToString","toString","nameRE","NAME","configurable","get","call","match","error"],"mappings":"kJAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,mBAAmB,CAACF,EAAG,MAAM,CAACE,YAAY,OAAO,CAACF,EAAG,MAAM,CAACE,YAAY,OAAOC,GAAG,CAAC,MAAQP,EAAIQ,YAAY,CAACJ,EAAG,MAAM,CAACK,MAAM,CAAC,IAAM,EAAQ,QAA8B,IAAM,QAAQL,EAAG,OAAO,CAACJ,EAAIU,GAAG,UAAUV,EAAIW,GAAG,KAAKP,EAAG,MAAM,CAACE,YAAY,aAAa,CAACF,EAAG,UAAU,CAACQ,IAAI,gBAAgBN,YAAY,aAAaG,MAAM,CAAC,cAAc,MAAM,MAAQT,EAAIa,WAAW,MAAQb,EAAIc,kBAAkB,CAACV,EAAG,eAAe,CAACK,MAAM,CAAC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AAoC,E,8BCnBf,IAAIC,EAAc,EAAQ,QACtBC,EAAiB,EAAQ,QAAuCC,EAEhEC,EAAoBC,SAASC,UAC7BC,EAA4BH,EAAkBI,SAC9CC,EAAS,wBACTC,EAAO,OAIPT,KAAiBS,KAAQN,IAC3BF,EAAeE,EAAmBM,EAAM,CACtCC,cAAc,EACdC,IAAK,WACH,IACE,OAAOL,EAA0BM,KAAKvE,MAAMwE,MAAML,GAAQ,GAC1D,MAAOM,GACP,MAAO,Q,kCCjBf,yBAAuf,EAAG","file":"js/chunk-315f5c4a.c64363f3.js","sourcesContent":["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:\"top\"},[_c('div',{staticClass:\"back\",on:{\"click\":_vm.backClick}},[_c('img',{attrs:{\"src\":require(\"@/assets/img/home/back.svg\"),\"alt\":\"\"}})]),_c('span',[_vm._v(\"短信登录\")]),_vm._m(0)]),_c('div',{staticClass:\"login_box\"},[_c('el-form',{ref:\"verifyFormRef\",staticClass:\"login_form\",attrs:{\"label-width\":\"0px\",\"model\":_vm.verifyForm,\"rules\":_vm.verifyFormRules}},[_c('el-form-item',{attrs:{\"prop\":\"iphone\"}},[_c('el-input',{ref:\"iphoneFormRef\",attrs:{\"placeholder\":\"请输入手机号\",\"prefix-icon\":\"el-icon-phone\"},model:{value:(_vm.verifyForm.iphone),callback:function ($$v) {_vm.$set(_vm.verifyForm, \"iphone\", $$v)},expression:\"verifyForm.iphone\"}})],1),_c('el-form-item',{staticClass:\"verify\",attrs:{\"prop\":\"code\"}},[_c('el-input',{staticClass:\"verifyMessage\",attrs:{\"placeholder\":\"请输入验证码\",\"prefix-icon\":\"el-icon-s-goods\"},model:{value:(_vm.verifyForm.code),callback:function ($$v) {_vm.$set(_vm.verifyForm, \"code\", $$v)},expression:\"verifyForm.code\"}}),_c('el-button',{staticClass:\"getVerify\",on:{\"click\":_vm.emitsmsverify}},[_vm._v(\"验证码\")])],1),_c('el-form-item',[_c('el-row',[_c('el-button',{staticClass:\"btns-login\",attrs:{\"type\":\"primary\"},on:{\"click\":_vm.login}},[_vm._v(\"登陆\")])],1)],1)],1)],1)])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('img',{staticClass:\"logo\",attrs:{\"src\":require(\"@/assets/img/cart/logo.jpg\"),\"alt\":\"\"}}),_c('div',{staticClass:\"icon\"},[_vm._v(\"交 酒\")])])}]\n\nexport { render, staticRenderFns }","<template>\n <div class=\"login_container\">\n <div class=\"top\">\n <div class=\"back\" @click=\"backClick\">\n <img src=\"@/assets/img/home/back.svg\" alt=\"\" />\n </div>\n <span>短信登录</span>\n <div>\n <img src=\"@/assets/img/cart/logo.jpg\" class=\"logo\" alt=\"\" />\n <div class=\"icon\">交 酒</div>\n </div>\n </div>\n <div class=\"login_box\">\n <!-- 登陆区域 -->\n <el-form\n ref=\"verifyFormRef\"\n label-width=\"0px\"\n class=\"login_form\"\n :model=\"verifyForm\"\n :rules=\"verifyFormRules\"\n >\n <el-form-item prop=\"iphone\">\n <el-input\n placeholder=\"请输入手机号\"\n v-model=\"verifyForm.iphone\"\n prefix-icon=\"el-icon-phone\"\n ref=\"iphoneFormRef\"\n ></el-input>\n </el-form-item>\n <el-form-item prop=\"code\" class=\"verify\">\n <el-input\n class=\"verifyMessage\"\n placeholder=\"请输入验证码\"\n v-model=\"verifyForm.code\"\n prefix-icon=\"el-icon-s-goods\"\n ></el-input>\n <el-button class=\"getVerify\" @click=\"emitsmsverify\">验证码</el-button>\n </el-form-item>\n <el-form-item>\n <el-row>\n <el-button class=\"btns-login\" type=\"primary\" @click=\"login\">登陆</el-button>\n </el-row>\n <!-- <el-button type=\"info\" @click=\"infoRegister\">注册</el-button> -->\n </el-form-item>\n </el-form>\n </div>\n\n\n </div>\n</template>\n\n<script>\n// import loginfature from \"./chilidComps/loginfature\"\n// import Scroll from '@/components/common/Scroll/Scroll'\n\nexport default {\n name: \"Iphone\",\n components: {},\n data() {\n var checkphone = (rule, value, callback) => {\n // let phoneReg = /(^1[3|4|5|6|7|8|9]\\d{9}$)|(^09\\d{8}$)/;\n if (value === \"\") {\n callback(new Error(\"请输入手机号\"));\n } else if (!this.isCellPhone(value)) {\n // 引入methods中封装的检查手机格式的方法\n callback(new Error(\"请输入正确的手机号!\"));\n } else {\n callback();\n }\n };\n return {\n verifyForm: {\n iphone: \"\",\n code: \"\"\n },\n verifyFormRules: {\n //验证用户名是否合法\n iphone: [\n { required: true, message: \"请输入电话号码\", trigger: \"blur\" },\n { validator: checkphone, trigger: \"blur\" }\n ],\n //验证密码是否合法\n code: [\n { required: true, message: \"请输入验证码\", trigger: \"blur\" },\n {\n min: 6,\n max: 6,\n message: \"验证码为6位\",\n trigger: \"blur\"\n }\n ]\n }\n };\n },\n methods: {\n async emitsmsverify() {\n this.$refs.verifyFormRef.validateField(\"iphone\", async err => {\n if (err) return;\n this.emitsms();\n var formData = new URLSearchParams();\n formData.append(\"iphone\", this.verifyForm.iphone);\n try {\n await this.$http({\n method: \"post\",\n url: \"/sms/get\",\n data: formData\n });\n this.$message.success(\"发送成功\");\n } catch {\n err => {\n this.$message.error(\"发送失败\");\n };\n }\n });\n },\n emitsms() {\n const btn = document.getElementsByClassName(\"getVerify\")[0];\n btn.setAttribute(\"disabled\", true);\n let time;\n let localtime = window.sessionStorage.getItem(\"time\");\n if (localtime == 0 || localtime == null) {\n time = 60;\n } else {\n time = localtime;\n }\n let timer = setInterval(function() {\n if (time >= 0) {\n btn.style.color = \"#606266\";\n btn.style.borderColor = \"#DCDFE6\";\n btn.style.backgroundColor = \"#FFF\";\n btn.innerHTML = time-- + \"秒\";\n window.sessionStorage.setItem(\"time\", time + 1);\n } else {\n clearInterval(timer);\n btn.disabled = false;\n btn.style.color = \"#fff\";\n btn.style.borderColor = \"#df3832\";\n btn.style.backgroundColor = \"#df3832\";\n btn.innerHTML = \"验证码\";\n }\n }, 1000);\n // setInterval(function(){\n // this.isclick=false\n // },60000)\n },\n isCellPhone(val) {\n if (!/^1(3|4|5|6|7|8|9)\\d{9}$/.test(val)) {\n return false;\n } else {\n return true;\n }\n },\n backClick() {\n this.$router.push(\"/login\");\n },\n login() {\n this.$refs.verifyFormRef.validate(async valid => {\n if (!valid) return;\n try {\n const { data: res } = await this.$http.post(\"/sms/login\", this.verifyForm);\n this.$message.success(\"如果第一次登录手机登录,默认密码为手机号\");\n window.localStorage.setItem(\"token\", res.token);\n window.localStorage.setItem(\"userId\", res.id);\n window.localStorage.setItem(\"name\", res.name);\n window.localStorage.setItem(\"ispraise\", \"1\");\n window.localStorage.setItem(\"number\", \"0\");\n this.$refs.verifyFormRef.resetFields();\n this.$bus.$emit('isallrefreshInfo')\n this.$router.push(\"/home\");\n } catch (err) {\n this.$message.error(\"登录失败\");\n }\n });\n }\n },\n mounted() {\n // window.onresize监听页面高度的变化\n window.onresize = () => {\n return (() => {\n this.showHeight = document.body.clientHeight;\n })();\n };\n\n let localtimer = window.sessionStorage.getItem(\"time\");\n if (localtimer == 0||localtimer==null) {\n }else{\n this.emitsms();\n }\n }\n};\n</script>\n\n<style scoped>\n.getVerify {\n color: #fff;\n border-color: #df3832;\n background-color: #df3832;\n}\n\n.getVerify {\n width: 30%;\n margin-left: 10%;\n text-align: center;\n font-size: 12px;\n}\n.back {\n position: relative;\n width: 30px;\n height: 30px;\n left:10px;\n top: 50%;\n transform: translate(0, -50%);\n}\n\n.login_container {\n height: 100vh;\n position: relative;\n}\n\n.verifyMessage {\n width: 60%;\n}\n\n.login_container .top .logo {\n top: 50%;\n transform: translate(0, -50%);\n right: 10px;\n position: absolute;\n height: 30px;\n width: 30px;\n}\n\n.login_container .top {\n position: relative;\n height: 44px;\n background-color: #df3832;\n color: #fff;\n text-align: center;\n}\n\n.login_container .top .icon {\n position: absolute;\n top: 50%;\n transform: translate(0, -50%);\n font-size: 12px;\n right: 45px;\n}\n\n.login_container .top .icon {\n position: absolute;\n top: 50%;\n transform: translate(0, -50%);\n font-size: 12px;\n right: 45px;\n}\n\n.login_container .top span {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n\n.login_form {\n width: 85%;\n margin: 0 auto;\n margin-top: 40px;\n}\n\n.btns-login {\n width: 100%;\n}\n\n.other-login {\n margin-top: 50px;\n text-align: center;\n}\n\n.bottom {\n margin: 0 auto;\n margin-top: 10px;\n width: 85%;\n height: 200px;\n border-top: 1px solid #f5f5f5;\n}\n.bottom img {\n margin-top: 20px;\n position: relative;\n left: 50%;\n transform: translate(-50%, 0);\n}\n.register {\n position: relative;\n height: 20px;\n width: 20px;\n font-size: 12px;\n color: #409eff;\n right: 0px;\n}\n</style>\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!./Iphone.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!./Iphone.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Iphone.vue?vue&type=template&id=2d99e81f&scoped=true&\"\nimport script from \"./Iphone.vue?vue&type=script&lang=js&\"\nexport * from \"./Iphone.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Iphone.vue?vue&type=style&index=0&id=2d99e81f&scoped=true&lang=css&\"\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 \"2d99e81f\",\n null\n \n)\n\nexport default component.exports","var DESCRIPTORS = require('../internals/descriptors');\nvar defineProperty = require('../internals/object-define-property').f;\n\nvar FunctionPrototype = Function.prototype;\nvar FunctionPrototypeToString = FunctionPrototype.toString;\nvar nameRE = /^\\s*function ([^ (]*)/;\nvar NAME = 'name';\n\n// Function instances `.name` property\n// https://tc39.github.io/ecma262/#sec-function-instances-name\nif (DESCRIPTORS && !(NAME in FunctionPrototype)) {\n defineProperty(FunctionPrototype, NAME, {\n configurable: true,\n get: function () {\n try {\n return FunctionPrototypeToString.call(this).match(nameRE)[1];\n } catch (error) {\n return '';\n }\n }\n });\n}\n","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Iphone.vue?vue&type=style&index=0&id=2d99e81f&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Iphone.vue?vue&type=style&index=0&id=2d99e81f&scoped=true&lang=css&\""],"sourceRoot":""}