import{d as M,a6 as z,u as R,r as V,a7 as v,x as A,y as l,z as h,A as a,B as u,a5 as o,aa as D,ai as E,v as O,ad as c,C as S,ah as j}from"./D3l4Cb4m.js";import{l as P}from"./BTYgDOhz.js";import{F as b,_ as Q}from"./WIvQOhpN.js";import{B as T}from"./BbpBKUVh.js";import{I as G}from"./_pi-gb-9.js";import"./C4Om2k4R.js";import"./DKnr-qPK.js";const H=""+new URL("logo.CQl7OOl2.png",import.meta.url).href,J=""+new URL("login_bg.Dw3h5En-.png",import.meta.url).href,K={relative:"","h-screen":"","overflow-hidden":""},W=l("img",{"w-58":"","select-none":"","pl-6":"","pt-4":"",src:H,alt:"Logo"},null,-1),X=l("img",{h:"90%",absolute:"","bottom-0":"","right-0":"","select-none":"","object-cover":"",src:J,alt:"Login Background"},null,-1),Y={absolute:"",top:"50%","z-9":"","translate-y":"-50%","max-w-92":"",w:"90%",left:"5%",sm:"left-12%","before:absolute":"","before:top":"-30%","before:left":"-30%","before:z--1":"","before:h-100":"","before:w-100":"",class:"before:bg-[radial-gradient(circle_12rem,#bfeee8_20%,#d8f2f2,transparent)] before:content-['']"},Z={shadow:"[0px_0px_10px_0px_rgba(25,60,117,0.14)]","w-full":"","rounded-2":"","bg-white":"","px-6":"","pb-10":"","pt-8":""},ee={text:"4.5 center","font-600":""},oe={"pt-6":""},pe=M({__name:"login",setup(te){const{t:n}=z(),w=R(),{companyCode:f,userId:_,userName:C,token:y,sessionId:x,accountId:k,guestSign:g}=E(),i=V(!1),I={span:24},N={span:24},B=b.useForm,t=v({companyCode:f.value,userName:_.value,sign:g.value}),U=v({companyCode:[{required:!0,whitespace:!0,message:n("请输入企业号")}],sign:[{required:!0,message:n("请输入签名")}],userName:[{required:!1,message:n("请输入账号")}]}),{validate:L,validateInfos:p}=B(t,U);function $(){L().then(()=>{i.value=!0,P(t).then(e=>{f.value=t.companyCode,_.value=e.uuid,C.value=e.nickname,y.value=e.token,x.value=e.sessionId,k.value=e.accountId||"123456",g.value=t.sign,w.push("/")}).catch(e=>{j.error(e.message)}).finally(()=>{i.value=!1})})}return(e,s)=>{const m=G,d=Q,q=b,F=T;return O(),A("div",K,[W,X,l("div",Y,[l("div",Z,[l("h3",ee,h(e.$t("访客端登录")),1),a(q,{"hide-required-mark":!0,"label-col":I,"wrapper-col":N},{default:u(()=>[a(d,c({label:e.$t("企业号")},o(p).companyCode),{default:u(()=>[a(m,{value:o(t).companyCode,"onUpdate:value":s[0]||(s[0]=r=>o(t).companyCode=r),valueModifiers:{trim:!0},maxlength:64,placeholder:o(n)("请输入企业号")},null,8,["value","placeholder"])]),_:1},16,["label"]),a(d,c({label:e.$t("签名")},o(p).sign),{default:u(()=>[a(m,{value:o(t).sign,"onUpdate:value":s[1]||(s[1]=r=>o(t).sign=r),valueModifiers:{trim:!0},maxlength:64,placeholder:o(n)("请输入签名")},null,8,["value","placeholder"])]),_:1},16,["label"]),a(d,c({label:e.$t("账号")},o(p).userName),{default:u(()=>[a(m,{value:o(t).userName,"onUpdate:value":s[2]||(s[2]=r=>o(t).userName=r),valueModifiers:{trim:!0},maxlength:64,placeholder:o(n)("请输入账号")},null,8,["value","placeholder"])]),_:1},16,["label"])]),_:1}),l("p",oe,[a(F,{type:"primary",block:"",loading:o(i),onClick:D($,["prevent"])},{default:u(()=>[S(h(e.$t("登录")),1)]),_:1},8,["loading"])])])])])}}});export{pe as default};
