import{_ as e,v as l,r as a,A as s,c as o,b as t,d as r,s as i,w as n,k as d,j as u,B as m,y as f,C as c,D as g,z as p,g as v,G as y,H as h}from"./index-DuyQv-rd.js";const b={class:"login-container"},w={class:"login-box"},x={class:"login-box-img"},C={class:"login-formbox"},_={style:{display:"flex"}},k={class:"login-code",style:{}},z=["src"],V={key:0},N={key:1},U={style:{display:"flex","justify-content":"center","align-items":"center",width:"100%","margin-top":"1.25rem"}},I={key:1,class:"face-login"},j={style:{display:"flex","justify-content":"center","align-items":"center",width:"100%","margin-top":"1.25rem"}},F=e({__name:"Login",setup(e){const F=f();c();const{proxy:q}=l(),D=a(!0),L=a(""),O=a(!1),R=a({userName:"",password:"",verificationCode:"",UUID:void 0,tenantId:"0"}),T={userName:[{required:!0,trigger:"blur",message:"请输入您的登录账号"}],password:[{required:!0,trigger:"blur",message:"请输入您的密码"}],verificationCode:[{required:!0,trigger:"blur",message:"请输入验证码"}]};function E(){q.$refs.loginRef.validate((e=>{e&&(O.value=!0,y(R.value).then((e=>{e.status&&(h.commit("setUserInfo",{...e.data}),F.push({path:"/"}))})).catch((e=>(R.value.verificationCode="",G(),O.value=!1,q.$message.error(res.message)))),setTimeout((()=>{O.value=!1}),1e3))}))}function G(){m().then((e=>{500!=e.Code?(L.value="data:image/gif;base64,"+e.img,R.value.UUID=e.uuid):G()}))}const $=a();return s((()=>{$.value.focus()})),G(),(e,l)=>{const a=d("el-input"),s=d("el-form-item"),m=d("el-button"),f=d("el-form");return t(),o("div",b,[r("div",w,[r("div",x,[r("div",C,[D.value?(t(),i(f,{key:0,ref:"loginRef",model:R.value,rules:T,class:"login-form"},{default:n((()=>[l[5]||(l[5]=r("div",{class:"title"},"欢迎登录...",-1)),l[6]||(l[6]=r("div",{style:{color:"#666666","font-size":"0.8rem",margin:"0.5rem 0"}}," WELCOME TO LOGIN ",-1)),u(s,{prop:"userName"},{default:n((()=>[u(a,{modelValue:R.value.userName,"onUpdate:modelValue":l[0]||(l[0]=e=>R.value.userName=e),style:{height:"3.13rem"},ref_key:"userNameRef",ref:$,type:"text",size:"large",autocomplete:"off",placeholder:"请输入您的登录账号"},null,8,["modelValue"])])),_:1}),u(s,{prop:"password"},{default:n((()=>[u(a,{"show-password":"",modelValue:R.value.password,"onUpdate:modelValue":l[1]||(l[1]=e=>R.value.password=e),style:{height:"3.13rem"},type:"password",size:"large","auto-complete":"off",placeholder:"请输入密码"},null,8,["modelValue"])])),_:1}),u(s,{prop:"verificationCode"},{default:n((()=>[r("div",_,[u(a,{modelValue:R.value.verificationCode,"onUpdate:modelValue":l[2]||(l[2]=e=>R.value.verificationCode=e),size:"large",onKeyup:g(E,["enter"]),style:{height:"3.13rem",width:"17.19rem","margin-right":"0.63rem"},"auto-complete":"off",placeholder:"验证码"},null,8,["modelValue"]),r("div",k,[r("img",{src:L.value,onClick:G,style:{width:"7.19rem",height:"3.13rem"},class:"login-code-img"},null,8,z)])])])),_:1}),u(s,null,{default:n((()=>[u(m,{loading:O.value,color:"#1F63FF",size:"large",style:{width:"100%",height:"3.13rem"},onClick:p(E,["prevent"])},{default:n((()=>[O.value?(t(),o("span",N,"登 录 中...")):(t(),o("span",V,"登 录"))])),_:1},8,["loading"]),r("div",U,[r("span",{style:{color:"#4386ff","border-bottom":"1px solid #4386ff","font-weight":"bold",cursor:"pointer","font-size":"1rem"},onClick:l[3]||(l[3]=e=>D.value=!1)},"人脸识别登录")])])),_:1})])),_:1},8,["model"])):(t(),o("div",I,[l[8]||(l[8]=r("span",{style:{"font-size":"0.88rem","font-weight":"bold",color:"#333333"}},"请将脸部正对蓝色显示框内，并保持光线充足",-1)),l[9]||(l[9]=r("div",{style:{display:"flex","justify-content":"center","align-items":"center",border:"1px solid #4386ff","border-radius":"50%",width:"18.75rem",height:"18.75rem",margin:"2.06rem 0","background-color":"#f1fcff"}},[r("img",{src:"/assets/face-FbNyTS9f.png",alt:""})],-1)),u(m,{type:"primary",size:"small",style:{width:"100%"}},{default:n((()=>l[7]||(l[7]=[v("开始识别")]))),_:1}),r("div",j,[r("span",{style:{color:"#4386ff","border-bottom":"1px solid #4386ff","font-weight":"bold",cursor:"pointer","font-size":"1rem"},onClick:l[4]||(l[4]=e=>D.value=!0)},"账号登录")])]))])])])])}}},[["__scopeId","data-v-31c0e365"]]);export{F as default};
