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,dB as M,bo as z,dC as J,dD as O,dE as P,j as c,bs as Q,i as W,bt as S,o as u,c as X,d as n,l as o,cS as B,a as t,w as _,b as g,m as T,dF as R,dG as Y,dH as Z,h as d,dI as ee,dJ as U,dp as K,e as L,dK as oe,$ as ne,dL as se,f as te,dM as ae,B as le,y as _e,p as ce,g as ue}from"./index.84095729.js";import{a as re}from"./headers.150b57de.js";import{_ as ie}from"./Input.0999d796.js";import{_ as pe}from"./Checkbox.518d2721.js";import"./Suffix.1572b359.js";const de=r=>(ce("data-v-7fb53885"),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=de(()=>n("div",{class:"login_space_form_divider_wrapper"},null,-1)),N={__name:"login",setup(r){const A=M(),k=z(),y=J(),w=O(),$=P(),i=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=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))})},E=()=>{l.value===""?x.value.focus():v()},x=c(null),F=s=>{x.value=s};return(s,e)=>{const V=re,I=ie,m=te,j=pe,q=ae,p=le,G=_e;return u(),X("div",{class:"login_page_wrapper",style:K({background:o(A).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:K({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(i),"onUpdate:value":e[0]||(e[0]=a=>T(i)?i.value=a:null),onKeydown:e[1]||(e[1]=R(a=>E(),["enter"])),placeholder:"\u8BF7\u8F93\u5165\u8D26\u53F7"},null,8,["value"])]),n("div",$e,[t(I,{ref:F,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(G,{justify:"center"},{default:_(()=>[t(m,{text:"",onClick:e[5]||(e[5]=a=>o(Y)()),"mr-5":""},{default:_(()=>[o(Z)?(u(),d(p,{key:0,type:"off-screen"})):(u(),d(p,{key:1,type:"full-screen"}))]),_:1}),t(m,{text:"",onClick:e[6]||(e[6]=a=>o(ee)()),"mr-5":""},{default:_(()=>[o(U)?(u(),d(p,{key:0,type:"sun-one"})):(u(),d(p,{key:1,type:"moon"}))]),_:1})]),_:1})])],4)],4)}}};typeof L=="function"&&L(N);var Re=H(N,[["__scopeId","data-v-7fb53885"]]);export{Re as default};
|