import{d as u,V as f,X as m,a5 as d,o as _,e as h,k as S}from"./index.0308b213.js";import b from"./LoginPage.ad2bcaa4.js";const I=u({setup(w){const{router:t,route:i}=f(),{getConfig:A,updateInfo:c}=m(),{login:r}=d(),s=n=>{r(n).then(e=>{let g=localStorage.getItem("shangpu_pinia-website-info")||"",o=JSON.parse(g);o.config.web_logo=e.logo,o.config.web_name=e.name;const p=JSON.stringify(o);localStorage.setItem("shangpu_pinia-website-info",p),c(e.name,e.logo,"","");const{query:{redirect:a}}=i;if(e.redirect){t.replace("/agent"+e.redirect);return}const l=typeof a=="string"?a:"/agent";t.replace(l)}).catch(e=>{console.log(e)})};return _(()=>{}),(n,e)=>(h(),S(b,{"login-title":"\u4EE3\u7406",onLogin:s}))}});export{I as default};
