import{l as p}from"./index-B_gQ7oB_.js";import{d as f,H as c,a as g,c as w,b as a,w as l,u as s,a2 as h,a3 as x,q as _,v as n,a0 as V,a1 as b,o as y,K as T,M as u,l as d,B as k,h as v}from"./index-cnJriAAq.js";import{u as C}from"./index-a9Hl8md3.js";import"./baseUrl-Djp-_xTD.js";const B={class:"w-full h-full relative overflow-hidden"},S=f({__name:"index",setup(q){const i=c();x();const t=g({username:"",password:""});async function m(){try{_({message:"登录中...",forbidClick:!0});const{code:o,data:e}=await p(t);n(),o==0&&(["265","264","132","107","55","81","95","36"].includes(String(e.id))?(b(e.token),i.push("/home")):V({message:"账号存在,但该账号不能使用本系统",duration:2e3}))}catch(o){console.log(o),n()}}return C("登录"),(o,e)=>(y(),w("div",B,[a(s(h),{class:"max-w-[95%] w-[400px] fixed top-[300px] left-[50%]",style:{transform:"translate(-50%, -50%)"},onSubmit:m},{default:l(()=>[a(s(T),null,{default:l(()=>[a(s(u),null,{default:l(()=>[a(s(d),{modelValue:t.username,"onUpdate:modelValue":e[0]||(e[0]=r=>t.username=r),label:"手机号",placeholder:"请输入手机号",maxlength:"11",rules:[{required:!0,message:"请填写手机号",trigger:"change"}]},null,8,["modelValue"])]),_:1}),a(s(u),null,{default:l(()=>[a(s(d),{modelValue:t.password,"onUpdate:modelValue":e[1]||(e[1]=r=>t.password=r),label:"密码",placeholder:"请输入密码",type:"password",rules:[{required:!0,message:"请填写用户名",trigger:"change"}]},null,8,["modelValue"])]),_:1}),a(s(u),{class:"mt-[16px]"},{default:l(()=>[a(s(k),{block:"",type:"primary","native-type":"submit"},{default:l(()=>e[2]||(e[2]=[v("登录")])),_:1})]),_:1})]),_:1})]),_:1})]))}});export{S as default};