1 |
- import{d as ue,I as fe,X as _e,r as x,u as ge,a1 as xe,J as he,a as e,e as ye,k as we,o as Z,c as ve,g as n,Y as A,t as u,a2 as B,f as a,w as l,Z as be,v as Fe,a3 as Ve,q as ke,O as Ne,Q as Pe,m as D,$ as Le,h as je,a0 as Ee,a4 as Se,a5 as Ue,a6 as H,a7 as Ie,a8 as Me,a9 as Te,aa as qe,ab as ze,z as Ce,E as Re,U as Oe,ac as Xe,i as Ye,C as Ge,p as Je,j as Ke,ad as Qe,ae as Ze,__tla as Ae}from"./index-2eab2d23.js";import{_ as Be,__tla as De}from"./Verify-7fbc0d94.js";import{_ as He,__tla as We}from"./XButton-f05c5131.js";import{E as $e,__tla as ea}from"./el-link-f0d278a2.js";import{_ as W}from"./logo-469cb37c.js";import{u as F,__tla as aa}from"./useIcon-0c8123fd.js";import{T as ta,_ as la,__tla as sa}from"./LocaleDropdown.vue_vue_type_script_setup_true_lang-2060647b.js";import{u as ra,L as na,a as oa,__tla as ia}from"./useLogin-a00caa87.js";import{_ as pa,__tla as da}from"./LoginFormTitle.vue_vue_type_script_setup_true_lang-670e5911.js";import{r as V,__tla as ma}from"./formRules-228bd511.js";import{_ as ca}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as ua}from"./el-dropdown-item-ca87bcd9.js";let $,fa=Promise.all([(()=>{try{return Ae}catch{}})(),(()=>{try{return De}catch{}})(),(()=>{try{return We}catch{}})(),(()=>{try{return ea}catch{}})(),(()=>{try{return aa}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return ua}catch{}})()]).then(async()=>{let h,k,N,P,L,j,E,S,U,I,M,T,q,z,C,R;h=y=>(Je("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:W},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:"/admin-ui-vue3/assets/login-box-bg-fec91044.svg"},null,-1)),S={key:"2",class:"text-3xl text-white"},U={key:"3",class:"mt-5 text-14px font-normal text-white"},I={class:"relative flex-1 p-30px dark:bg-[var(--login-bg-color)] lt-sm:p-10px"},M={class:"flex items-center justify-between text-white at-2xl:justify-end at-xl:justify-end"},T={class:"flex items-center at-2xl:hidden at-xl:hidden"},q=h(()=>n("img",{alt:"",class:"mr-10px h-48px w-48px",src:W},null,-1)),z={class:"text-20px font-bold"},C={class:"flex items-center justify-end space-x-10px"},R={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"},$=ca(ue({name:"SocialLogin",__name:"SocialLogin",setup(y){const{t:m}=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"}),Y=x(),{validForm:se}=oa(Y),{getLoginState:re}=ra(),{push:ne}=ge(),oe=xe(),v=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}}),J=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;v.value=!0;try{if(await(async()=>{if(t.tenantEnable==="true"){const b=await Qe(t.loginForm.tenantName);Ze(b)}})(),!await se())return;let o=w("redirect");const c=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 Me({username:t.loginForm.username,password:t.loginForm.password,captchaVerification:r.captchaVerification,socialCode:f,socialState:_,socialType:c});if(!g)return;K.value=Te.service({lock:!0,text:"\u6B63\u5728\u52A0\u8F7D\u7CFB\u7EDF\u4E2D...",background:"rgba(0, 0, 0, 0.7)"}),t.loginForm.rememberMe?qe(t.loginForm):ze(),H(g),o||(o="/"),o.indexOf("sso")!==-1?window.location.href=window.location.href.replace("/login?redirect=",""):ne({path:o||oe.addRouters[0].path})}finally{v.value=!1,K.value.close()}};return we(()=>{(()=>{const r=Se();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"),c=(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 Ue(p,c,f);H(_),Ie.push({path:o||"/"})}catch{}})()}),(r,s)=>{const p=Ce,o=Re,c=Oe,f=Xe,_=$e,g=Ye,b=He,me=Be,ce=Ge;return Z(),ve("div",{class:A([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:A(`${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(B)(e(O).getTitle)),1)]),n("div",j,[a(be,{appear:"","enter-active-class":"animate__animated animate__bounceInLeft",tag:"div"},{default:l(()=>[E,n("div",S,u(e(m)("login.welcome")),1),n("div",U,u(e(m)("login.message")),1)]),_:1})])],2),n("div",I,[n("div",M,[n("div",T,[q,n("span",z,u(e(B)(e(O).getTitle)),1)]),n("div",C,[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",R,[Fe(a(ce,{ref_key:"formLogin",ref:Y,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"?(Z(),ke(p,{key:0,prop:"tenantName"},{default:l(()=>[a(c,{modelValue:e(t).loginForm.tenantName,"onUpdate:modelValue":s[0]||(s[0]=d=>e(t).loginForm.tenantName=d),placeholder:e(m)("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(c,{modelValue:e(t).loginForm.username,"onUpdate:modelValue":s[1]||(s[1]=d=>e(t).loginForm.username=d),placeholder:e(m)("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(c,{modelValue:e(t).loginForm.password,"onUpdate:modelValue":s[2]||(s[2]=d=>e(t).loginForm.password=d),placeholder:e(m)("login.passwordPlaceholder"),"prefix-icon":e(le),"show-password":"",type:"password",onKeyup:s[3]||(s[3]=Pe(d=>J(),["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(()=>[D(u(e(m)("login.remember")),1)]),_:1},8,["modelValue"])]),_:1}),a(o,{offset:6,span:12},{default:l(()=>[a(_,{style:{float:"right"},type:"primary"},{default:l(()=>[D(u(e(m)("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(b,{loading:e(v),title:e(m)("login.login"),class:"w-[100%]",type:"primary",onClick:s[5]||(s[5]=d=>J())},null,8,["loading","title"])]),_:1})]),_:1}),a(me,{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,$ as default};
|