{"version":3,"sources":["webpack:///./src/views/login/login.vue?1d02","webpack:///./src/views/login/login.vue?2f15","webpack:///./src/views/login/login.vue?e64c","webpack:///./src/views/login/login.vue"],"names":["_withId","_hoisted_1","class","id","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","render","_ctx","_cache","$props","$setup","$data","$options","type","placeholder","name","$event","ruleFormRef","account","trim","password","onKeyup","login","args","onClick","setup","router","store","message","error","test","params","URLSearchParams","append","then","res","console","log","data","errorcode","resultmsg","commit","push","path","window","localStorage","setItem","JSON","stringify","user","__exports__"],"mappings":"kHAAA,W,yDCCMA,EAAuB,gBAAa,mBAE1C,eAAa,mBACb,IAAMC,EAAa,CACjBC,MAAO,WACPC,GAAI,cAEAC,EAAa,CAAED,GAAI,SACnBE,EAA0B,eAAa,KAAM,CAAEH,MAAO,SAAW,QAAS,GAC1EI,EAAa,CAAEJ,MAAO,kBACtBK,EAA0B,eAAa,OAAQ,KAAM,QAAS,GAC9DC,EAAa,CAAEN,MAAO,mBACtBO,EAA0B,eAAa,OAAQ,KAAM,OAAQ,GAC7DC,EAAa,CAAER,MAAO,cAC5B,iBAEO,IAAMS,EAAsBX,GAAQ,SAACY,EAAUC,EAAYC,EAAYC,EAAYC,EAAWC,GACnG,OAAQ,iBAAc,eAAa,MAAOhB,EAAY,CACpD,eAAa,MAAOG,EAAY,CAC9BC,EACA,eAAa,MAAOC,EAAY,CAC9BC,EACA,gBAAgB,eAAa,QAAS,CACpCW,KAAM,OACNC,YAAa,SACbC,KAAM,UACN,sBAAuBP,EAAO,KAAOA,EAAO,GAAK,SAACQ,GAAgB,OAACT,EAAKU,YAAYC,QAAUF,KAC7F,KAAM,KAAM,CACb,CACE,OACAT,EAAKU,YAAYC,aACjB,EACA,CAAEC,MAAM,QAId,eAAa,MAAOhB,EAAY,CAC9BC,EACA,gBAAgB,eAAa,QAAS,CACpCS,KAAM,OACNC,YAAa,QACbC,KAAM,WACN,sBAAuBP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aC,QAAQ,QAAQ,YACxBf,EAAS,IAAIC,gBACjBD,EAAOE,OAAO,QAAShB,EAAYC,SACnCa,EAAOE,OAAO,WAAYhB,EAAYG,YAehC,qDAAqDU,KAAKb,EAAYC,WAAe,mBAAmBY,KAAKb,EAAYC,SAExI,OADA,OAAUW,MAAM,iBACT,CAAP,GAAO,G,iBAMF,MAAO,CACHZ,YAAW,EACXK,MAAK,M,iCCnEjB,MAAM4B,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAAS5C,GAAQ,CAAC,YAAY,qBAE1E,gB","file":"js/chunk-d1ea2efc.5ac2d1bf.js","sourcesContent":["export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/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-v16/dist/index.js??ref--0-1!./login.vue?vue&type=style&index=0&id=14d87ec2&scoped=true&lang=scss\"","import { createVNode as _createVNode, vModelText as _vModelText, withDirectives as _withDirectives, withKeys as _withKeys, openBlock as _openBlock, createBlock as _createBlock, withScopeId as _withScopeId, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\nconst _withId = /*#__PURE__*/_withScopeId(\"data-v-14d87ec2\")\n\n_pushScopeId(\"data-v-14d87ec2\")\nconst _hoisted_1 = {\n class: \"clearfix\",\n id: \"login_wrap\"\n}\nconst _hoisted_2 = { id: \"login\" }\nconst _hoisted_3 = /*#__PURE__*/_createVNode(\"h2\", { class: \"title\" }, \"流锋管理\", -1)\nconst _hoisted_4 = { class: \"login--account\" }\nconst _hoisted_5 = /*#__PURE__*/_createVNode(\"span\", null, \"手机号:\", -1)\nconst _hoisted_6 = { class: \"login--password\" }\nconst _hoisted_7 = /*#__PURE__*/_createVNode(\"span\", null, \"密码:\", -1)\nconst _hoisted_8 = { class: \"login--btn\" }\n_popScopeId()\n\nexport const render = /*#__PURE__*/_withId((_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) => {\n return (_openBlock(), _createBlock(\"div\", _hoisted_1, [\n _createVNode(\"div\", _hoisted_2, [\n _hoisted_3,\n _createVNode(\"div\", _hoisted_4, [\n _hoisted_5,\n _withDirectives(_createVNode(\"input\", {\n type: \"text\",\n placeholder: \"请输入手机号\",\n name: \"account\",\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => (_ctx.ruleFormRef.account = $event))\n }, null, 512), [\n [\n _vModelText,\n _ctx.ruleFormRef.account,\n void 0,\n { trim: true }\n ]\n ])\n ]),\n _createVNode(\"div\", _hoisted_6, [\n _hoisted_7,\n _withDirectives(_createVNode(\"input\", {\n type: \"text\",\n placeholder: \"请输入密码\",\n name: \"password\",\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event: any) => (_ctx.ruleFormRef.password = $event)),\n onKeyup: _cache[3] || (_cache[3] = _withKeys(\n//@ts-ignore\n(...args) => (_ctx.login && _ctx.login(...args)), [\"enter\"]))\n }, null, 544), [\n [\n _vModelText,\n _ctx.ruleFormRef.password,\n void 0,\n { trim: true }\n ]\n ])\n ]),\n _createVNode(\"p\", _hoisted_8, [\n _createVNode(\"button\", {\n id: \"loginBtn\",\n onClick: _cache[4] || (_cache[4] = \n//@ts-ignore\n(...args) => (_ctx.login && _ctx.login(...args)))\n }, \"登录\")\n ])\n ])\n ]))\n})","\nimport { ElMessage } from 'element-plus';\nimport { defineComponent, reactive, ref } from \"vue\";\nimport {loginApi} from \"@/api/login\";\nimport { useRouter } from 'vue-router';\nimport {useStore} from \"vuex\";\nexport default defineComponent({\n setup() {\n let router=useRouter();\n let store=useStore();\n let ruleFormRef = reactive({\n password:'',\n account:'',\n });\n \n let login =async ()=>{\n if(ruleFormRef.password == \"\" && ruleFormRef.account == \"\"){\n \n ElMessage({message:\"手机号不能为空!\",type:\"error\"})\n }else if(ruleFormRef.password == \"\" ){\n ElMessage({message:\"验证码不能为空!\",type:\"error\"})\n }else\n if(ruleFormRef.account == \"\"){\n ElMessage.error(\"账户不能为空!\")\n }else{\n\n if ((/^1[345789]\\d{9}$/.test(ruleFormRef.account))) {\n\t\t\t \n var params = new URLSearchParams();\n params.append('phone', ruleFormRef.account); //你要传给后台的参数值 key/value\n params.append('password', ruleFormRef.password);\n loginApi(params).then((res)=>{\n console.log(res,\"677777777777\")\n const data:any = res;\n if(data.errorcode != 0){\n ElMessage.error(data.resultmsg)\n }else{\n store.commit(\"SET_PERMISSION\",null);\n // location.reload();\n router.push({path:\"/home\"});\n window.localStorage.setItem(\"token\",\"token\")\n localStorage.setItem(\"token\",JSON.stringify(data.user))\n }\n })\n\t\t } \n if ((/^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$/.test(ruleFormRef.account))) {\n\t\t\t window.localStorage.setItem(\"token\",\"is token\");\n var params = new URLSearchParams();\n params.append('email', ruleFormRef.account); //你要传给后台的参数值 key/value\n params.append('password', ruleFormRef.password);\n // loginByEmail(params).then((res)=>{\n // const data:any = res;\n // if(data.errorcode != 0){\n // ElMessage.error(data.resultmsg)\n // }else{\n // store.commit(\"SET_PERMISSION\",null);\n // // location.reload();\n // router.push({path:\"/\"});\n // window.localStorage.setItem(\"token\",\"token\")\n // localStorage.setItem(\"token\",JSON.stringify(data.user))\n \n // }\n // })\n }\n if (!(/^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$/.test(ruleFormRef.account)) && !(/^1[345789]\\d{9}$/.test(ruleFormRef.account))) {\n\t\t\tElMessage.error(\"请输入正确的邮箱或手机号!\")\n\t\t\treturn false;\n }\n \n //重新触发路由\n }\n };\n return {\n ruleFormRef,\n login,\n }\n },\n})\n","import { render } from \"./login.vue?vue&type=template&id=14d87ec2&scoped=true&ts=true\"\nimport script from \"./login.vue?vue&type=script&lang=ts\"\nexport * from \"./login.vue?vue&type=script&lang=ts\"\n\nimport \"./login.vue?vue&type=style&index=0&id=14d87ec2&scoped=true&lang=scss\"\n\nimport exportComponent from \"E:\\\\vue\\\\流锋管理\\\\node_modules\\\\vue-loader-v16\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-14d87ec2\"]])\n\nexport default __exports__"],"sourceRoot":""}