You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
3.1 KiB
JavaScript
2 lines
3.1 KiB
JavaScript
import{_ as G,dy as H,bn as J,dz as M,dA as P,dB as O,f as c,br as Q,e as W,bs as S,o as u,c as X,h as n,j as o,cP as B,a as t,w as _,i as g,k as T,dC as R,dD as Y,dE as Z,b as p,dF as ee,dG as U,dl as A,d as E,dH as oe,$ as ne,dI as se,s as te,dJ as ae,y as le,v as _e,bE as ce,bF as ue}from"./index.b3ec3a5e.js";import{a as re}from"./headers.4aae405d.js";import{_ as de}from"./Input.68f30eae.js";import{_ as ie}from"./Checkbox.f53b8a35.js";import"./Suffix.ae0185d9.js";const pe=r=>(ce("data-v-93454da0"),r=r(),ue(),r),fe={class:"login_logo_wrapper"},ve=["src"],me={class:"login_space_image_wrapper"},ge=["src"],ke={class:"login_space_form_wrapper"},ye={"mt-5":""},we={"mt-5":""},$e={"mt-5":""},he={"mt-10":""},be={"mt-5":""},Ce=pe(()=>n("div",{class:"login_space_form_divider_wrapper"},null,-1)),F={__name:"login",setup(r){const N=H(),k=J(),y=M(),w=P(),$=O(),d=c(""),l=c(""),f=c(!1),D=s=>{f.value=s},h={f:"/"},b=c(h);Q(s=>{C(s.query)});const C=s=>{b.value={f:s.f||h.f}};W(()=>{C(S.currentRoute.value.query)});const v=async()=>{const s=d.value.replace(/^\s+|\s+$/g,"");if(s==="")return window.$message().error("\u8BF7\u8F93\u5165\u8D26\u53F7");if(l.value==="")return window.$message().error("\u8BF7\u8F93\u5165\u5BC6\u7801");const e=await oe({account:s,password:l.value});ne(e,()=>{f.value?(y.value="local",w.value="",$.value=e.data.token):(y.value="session",w.value=e.data.token,$.value=""),se(),S.push(decodeURIComponent(b.value.f))})},K=()=>{l.value===""?x.value.focus():v()},x=c(null),L=s=>{x.value=s};return(s,e)=>{const V=re,I=de,m=te,j=ie,q=ae,i=le,z=_e;return u(),X("div",{class:"login_page_wrapper",style:A({background:o(N).app_theme+"20"})},[n("div",fe,[n("img",{src:o(B)(o(k).config.Logo),alt:""},null,8,ve)]),n("div",{class:"login_space_wrapper shadow-lg",style:A({background:o(U)?"#333333":"#ffffff"})},[n("div",me,[n("img",{src:o(B)(o(k).config.Login\u6B22\u8FCE\u56FE\u7247),alt:""},null,8,ge)]),n("div",ke,[n("div",ye,[t(V,null,{default:_(()=>[g("\u767B\u5F55")]),_:1})]),n("div",we,[t(I,{value:o(d),"onUpdate:value":e[0]||(e[0]=a=>T(d)?d.value=a:null),onKeydown:e[1]||(e[1]=R(a=>K(),["enter"])),placeholder:"\u8BF7\u8F93\u5165\u8D26\u53F7"},null,8,["value"])]),n("div",$e,[t(I,{ref:L,type:"password",onKeydown:e[2]||(e[2]=R(a=>v(),["enter"])),value:o(l),"onUpdate:value":e[3]||(e[3]=a=>T(l)?l.value=a:null),placeholder:"\u8BF7\u8F93\u5165\u5BC6\u7801"},null,8,["value"])]),n("div",he,[t(m,{onClick:e[4]||(e[4]=a=>v()),type:"primary","w-full":""},{default:_(()=>[g("\u767B\u5F55")]),_:1})]),n("div",be,[t(j,{"onUpdate:checked":D,"default-checked":o(f)},{default:_(()=>[g("\u81EA\u52A8\u767B\u5F55")]),_:1},8,["default-checked"])]),Ce,t(q,{dashed:""}),t(z,{justify:"center"},{default:_(()=>[t(m,{text:"",onClick:e[5]||(e[5]=a=>o(Y)()),"mr-5":""},{default:_(()=>[o(Z)?(u(),p(i,{key:0,type:"off-screen"})):(u(),p(i,{key:1,type:"full-screen"}))]),_:1}),t(m,{text:"",onClick:e[6]||(e[6]=a=>o(ee)()),"mr-5":""},{default:_(()=>[o(U)?(u(),p(i,{key:0,type:"sun-one"})):(u(),p(i,{key:1,type:"moon"}))]),_:1})]),_:1})])],4)],4)}}};typeof E=="function"&&E(F);var Re=G(F,[["__scopeId","data-v-93454da0"]]);export{Re as default};
|