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 H,ck as z,bn as J,dB as M,dC as O,dD as P,f as c,br as Q,e as W,bs as S,o as u,c as X,h as n,j as o,cU as B,a as t,w as _,i as g,k as T,dE as U,dF as Y,dG as Z,b as p,dH as ee,dI as R,dp as E,d as F,dJ as oe,$ as ne,dK as se,s as te,dL as ae,y as le,v as _e,bE as ce,bF as ue}from"./index.0b7ff98e.js";import{a as re}from"./headers.6bbafe9a.js";import{_ as ie}from"./Input.c4292283.js";import{_ as de}from"./Checkbox.82eb48fc.js";import"./Suffix.f7c5b709.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)),K={__name:"login",setup(r){const L=z(),k=J(),y=M(),w=O(),$=P(),i=c(""),l=c(""),f=c(!1),N=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=i.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))})},A=()=>{l.value===""?x.value.focus():v()},x=c(null),D=s=>{x.value=s};return(s,e)=>{const V=re,I=ie,m=te,j=de,q=ae,d=le,G=_e;return u(),X("div",{class:"login_page_wrapper",style:E({background:o(L).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:E({background:o(R)?"#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(i),"onUpdate:value":e[0]||(e[0]=a=>T(i)?i.value=a:null),onKeydown:e[1]||(e[1]=U(a=>A(),["enter"])),placeholder:"\u8BF7\u8F93\u5165\u8D26\u53F7"},null,8,["value"])]),n("div",$e,[t(I,{ref:D,type:"password",onKeydown:e[2]||(e[2]=U(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":N,"default-checked":o(f)},{default:_(()=>[g("\u81EA\u52A8\u767B\u5F55")]),_:1},8,["default-checked"])]),Ce,t(q,{dashed:""}),t(G,{justify:"center"},{default:_(()=>[t(m,{text:"",onClick:e[5]||(e[5]=a=>o(Y)()),"mr-5":""},{default:_(()=>[o(Z)?(u(),p(d,{key:0,type:"off-screen"})):(u(),p(d,{key:1,type:"full-screen"}))]),_:1}),t(m,{text:"",onClick:e[6]||(e[6]=a=>o(ee)()),"mr-5":""},{default:_(()=>[o(R)?(u(),p(d,{key:0,type:"sun-one"})):(u(),p(d,{key:1,type:"moon"}))]),_:1})]),_:1})])],4)],4)}}};typeof F=="function"&&F(K);var Ue=H(K,[["__scopeId","data-v-93454da0"]]);export{Ue as default};
|