1 |
- import{d as ue,M as fe,b as _e,r as x,u as ge,a4 as xe,e as he,a as e,g as ye,y as we,o as B,c as be,j as n,a0 as D,t as u,a5 as J,i as a,w as l,a1 as ve,C as Fe,a6 as Ve,k as ke,R as Ne,T as Pe,l as W,a2 as Le,A as je,a3 as Ee,a7 as Me,a8 as Se,$ as Y,a9 as Te,aa as Ie,ab as Ue,ac as ze,ad as Ce,H as Re,E as qe,X as Oe,ae as Xe,n as $e,I as Ge,s as He,v as Ke,af as Qe,ag as Be,__tla as De}from"./index-abaca7e8.js";import{_ as Je,__tla as We}from"./Verify-c6a77923.js";import{_ as Ye,__tla as Ze}from"./XButton-6035d2d9.js";import{E as Ae,__tla as ea}from"./el-link-4b1b248f.js";import{_ as Z}from"./logo-b1faf256.js";import{u as F,__tla as aa}from"./useIcon-d9e11899.js";import{T as ta,_ as la,__tla as sa}from"./LocaleDropdown.vue_vue_type_script_setup_true_lang-328a6d2e.js";import{u as ra,L as na,a as oa,__tla as ia}from"./useLogin-ecf897e8.js";import{_ as pa,__tla as da}from"./LoginFormTitle.vue_vue_type_script_setup_true_lang-14895e93.js";import{r as V,__tla as ca}from"./formRules-04bbe1b7.js";import{_ as ma}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as ua}from"./el-dropdown-item-9dc30228.js";let A,fa=Promise.all([(()=>{try{return De}catch{}})(),(()=>{try{return We}catch{}})(),(()=>{try{return Ze}catch{}})(),(()=>{try{return ea}catch{}})(),(()=>{try{return aa}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return ca}catch{}})(),(()=>{try{return ua}catch{}})()]).then(async()=>{let h,k,N,P,L,j,E,M,S,T,I,U,z,C,R,q;h=y=>(He("data-v-9ecedb63"),y=y(),Ke(),y),k={class:"relative mx-auto h-full flex"},N={class:"relative flex items-center text-white"},P=h(()=>n("img",{alt:"",class:"mr-10px h-48px w-48px",src:Z},null,-1)),L={class:"text-20px font-bold"},j={class:"h-[calc(100%-60px)] flex items-center justify-center"},E=h(()=>n("img",{key:"1",alt:"",class:"w-350px",src:"/assets/login-box-bg-fec91044.svg"},null,-1)),M={key:"2",class:"text-3xl text-white"},S={key:"3",class:"mt-5 text-14px font-normal text-white"},T={class:"relative flex-1 p-30px dark:bg-[var(--login-bg-color)] lt-sm:p-10px"},I={class:"flex items-center justify-between text-white at-2xl:justify-end at-xl:justify-end"},U={class:"flex items-center at-2xl:hidden at-xl:hidden"},z=h(()=>n("img",{alt:"",class:"mr-10px h-48px w-48px",src:Z},null,-1)),C={class:"text-20px font-bold"},R={class:"flex items-center justify-end space-x-10px"},q={class:"m-auto h-full w-[100%] flex items-center at-2xl:max-w-500px at-lg:max-w-500px at-md:max-w-500px at-xl:max-w-500px"},A=ma(ue({name:"SocialLogin",__name:"SocialLogin",setup(y){const{t:c}=je(),i=fe(),O=_e(),{getPrefixCls:ee}=Ee(),X=ee("login"),ae=F({icon:"ep:house"}),te=F({icon:"ep:avatar"}),le=F({icon:"ep:lock"}),$=x(),{validForm:se}=oa($),{getLoginState:re}=ra(),{push:ne}=ge(),oe=xe(),b=x(!1),G=x(),ie=x("blockPuzzle"),pe=he(()=>e(re)===na.LOGIN),de={tenantName:[V],username:[V],password:[V]},t=ye({isShowPassword:!1,captchaEnable:"false",tenantEnable:"false",loginForm:{tenantName:"\u975E\u7E41\u79D1\u6280",username:"admin",password:"zx123",captchaVerification:"",rememberMe:!1}}),H=async()=>{t.captchaEnable==="false"?await Q({}):G.value.show()},K=x();function w(r){return new URL(decodeURIComponent(location.href)).searchParams.get(r)??""}const Q=async r=>{var s,p;b.value=!0;try{if(await(async()=>{if(t.tenantEnable==="true"){const v=await Qe(t.loginForm.tenantName);Be(v)}})(),!await se())return;let o=w("redirect");const m=w("type"),f=(s=i==null?void 0:i.query)==null?void 0:s.code,_=(p=i==null?void 0:i.query)==null?void 0:p.state,g=await Ie({username:t.loginForm.username,password:t.loginForm.password,captchaVerification:r.captchaVerification,socialCode:f,socialState:_,socialType:m});if(!g)return;K.value=Ue.service({lock:!0,text:"\u6B63\u5728\u52A0\u8F7D\u7CFB\u7EDF\u4E2D...",background:"rgba(0, 0, 0, 0.7)"}),t.loginForm.rememberMe?ze(t.loginForm):Ce(),Y(g),o||(o="/"),o.indexOf("sso")!==-1?window.location.href=window.location.href.replace("/login?redirect=",""):ne({path:o||oe.addRouters[0].path})}finally{b.value=!1,K.value.close()}};return we(()=>{(()=>{const r=Me();r&&(t.loginForm={...t.loginForm,username:r.username?r.username:t.loginForm.username,password:r.password?r.password:t.loginForm.password,rememberMe:!!r.rememberMe,tenantName:r.tenantName?r.tenantName:t.loginForm.tenantName})})(),(async()=>{var r,s;try{const p=w("type"),o=w("redirect"),m=(r=i==null?void 0:i.query)==null?void 0:r.code,f=(s=i==null?void 0:i.query)==null?void 0:s.state,_=await Se(p,m,f);Y(_),Te.push({path:o||"/"})}catch{}})()}),(r,s)=>{const p=Re,o=qe,m=Oe,f=Xe,_=Ae,g=$e,v=Ye,ce=Je,me=Ge;return B(),be("div",{class:D([e(X),"relative h-[100%] lt-xl:bg-[var(--login-bg-color)] lt-md:px-10px lt-sm:px-10px lt-xl:px-10px"])},[n("div",k,[n("div",{class:D(`${e(X)}__left flex-1 bg-gray-500 bg-opacity-20 relative p-30px lt-xl:hidden`)},[n("div",N,[P,n("span",L,u(e(J)(e(O).getTitle)),1)]),n("div",j,[a(ve,{appear:"","enter-active-class":"animate__animated animate__bounceInLeft",tag:"div"},{default:l(()=>[E,n("div",M,u(e(c)("login.welcome")),1),n("div",S,u(e(c)("login.message")),1)]),_:1})])],2),n("div",T,[n("div",I,[n("div",U,[z,n("span",C,u(e(J)(e(O).getTitle)),1)]),n("div",R,[a(e(ta)),a(e(la),{class:"dark:text-white lt-xl:text-white"})])]),a(Le,{appear:"","enter-active-class":"animate__animated animate__bounceInRight"},{default:l(()=>[n("div",q,[Fe(a(me,{ref_key:"formLogin",ref:$,model:e(t).loginForm,rules:de,class:"login-form","label-position":"top","label-width":"120px",size:"large"},{default:l(()=>[a(g,{style:{"margin-right":"-10px","margin-left":"-10px"}},{default:l(()=>[a(o,{span:24,style:{"padding-right":"10px","padding-left":"10px"}},{default:l(()=>[a(p,null,{default:l(()=>[a(pa,{style:{width:"100%"}})]),_:1})]),_:1}),a(o,{span:24,style:{"padding-right":"10px","padding-left":"10px"}},{default:l(()=>[e(t).tenantEnable==="true"?(B(),ke(p,{key:0,prop:"tenantName"},{default:l(()=>[a(m,{modelValue:e(t).loginForm.tenantName,"onUpdate:modelValue":s[0]||(s[0]=d=>e(t).loginForm.tenantName=d),placeholder:e(c)("login.tenantNamePlaceholder"),"prefix-icon":e(ae),link:"",type:"primary"},null,8,["modelValue","placeholder","prefix-icon"])]),_:1})):Ne("",!0)]),_:1}),a(o,{span:24,style:{"padding-right":"10px","padding-left":"10px"}},{default:l(()=>[a(p,{prop:"username"},{default:l(()=>[a(m,{modelValue:e(t).loginForm.username,"onUpdate:modelValue":s[1]||(s[1]=d=>e(t).loginForm.username=d),placeholder:e(c)("login.usernamePlaceholder"),"prefix-icon":e(te)},null,8,["modelValue","placeholder","prefix-icon"])]),_:1})]),_:1}),a(o,{span:24,style:{"padding-right":"10px","padding-left":"10px"}},{default:l(()=>[a(p,{prop:"password"},{default:l(()=>[a(m,{modelValue:e(t).loginForm.password,"onUpdate:modelValue":s[2]||(s[2]=d=>e(t).loginForm.password=d),placeholder:e(c)("login.passwordPlaceholder"),"prefix-icon":e(le),"show-password":"",type:"password",onKeyup:s[3]||(s[3]=Pe(d=>H(),["enter"]))},null,8,["modelValue","placeholder","prefix-icon"])]),_:1})]),_:1}),a(o,{span:24,style:{"padding-right":"10px","padding-left":"10px","margin-top":"-20px","margin-bottom":"-20px"}},{default:l(()=>[a(p,null,{default:l(()=>[a(g,{justify:"space-between",style:{width:"100%"}},{default:l(()=>[a(o,{span:6},{default:l(()=>[a(f,{modelValue:e(t).loginForm.rememberMe,"onUpdate:modelValue":s[4]||(s[4]=d=>e(t).loginForm.rememberMe=d)},{default:l(()=>[W(u(e(c)("login.remember")),1)]),_:1},8,["modelValue"])]),_:1}),a(o,{offset:6,span:12},{default:l(()=>[a(_,{style:{float:"right"},type:"primary"},{default:l(()=>[W(u(e(c)("login.forgetPassword")),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),a(o,{span:24,style:{"padding-right":"10px","padding-left":"10px"}},{default:l(()=>[a(p,null,{default:l(()=>[a(v,{loading:e(b),title:e(c)("login.login"),class:"w-[100%]",type:"primary",onClick:s[5]||(s[5]=d=>H())},null,8,["loading","title"])]),_:1})]),_:1}),a(ce,{ref_key:"verify",ref:G,captchaType:e(ie),imgSize:{width:"400px",height:"200px"},mode:"pop",onSuccess:Q},null,8,["captchaType"])]),_:1})]),_:1},8,["model"]),[[Ve,e(pe)]])])]),_:1})])])],2)}}}),[["__scopeId","data-v-9ecedb63"]])});export{fa as __tla,A as default};
|