1 |
- import{d as g,_ as y,f as k,n as C,a as M,a8 as I,D as S}from"./index-ba596ae9.js";import{b as j,r as B,g as N}from"./router-1773feb7.js";import{h as d,p as m,M as p,N as a,q as e,ae as q,k as f,aj as h,t as n,m as b,ac as A,B as D,i as F,J as $,O as H,a5 as T}from"./vue-a39e6937.js";import{H as v,A as E,F as w}from"./footer-a0716a4b.js";import{m as x}from"./layout-df994644.js";import"./darkSwitch-2d22b024.js";import"./useDark-be37a710.js";function J(){return new Promise(i=>{i({type:"continue"})})}const L=d({__name:"main",setup(i){const l=g();return(u,r)=>{const s=n("router-view"),o=n("el-main");return m(),p(o,{class:"layout-main"},{default:a(()=>[e(s,null,{default:a(({Component:t})=>[e(q,{name:f(l).layout.mainAnimation,mode:"out-in"},{default:a(()=>[(m(),p(h(t)))]),_:2},1032,["name"])]),_:1})]),_:1})}}});const O=y(L,[["__scopeId","data-v-bc73de31"]]),P=d({__name:"default",setup(i){return(l,u)=>{const r=n("el-col"),s=n("el-row"),o=n("el-scrollbar"),t=n("el-container");return m(),p(t,{class:"is-vertical"},{default:a(()=>[e(v),e(o,{style:b(f(x)()),ref:"mainScrollbarRef"},{default:a(()=>[e(s,{class:"frontend-footer-brother",justify:"center"},{default:a(()=>[e(r,{class:"user-layouts",span:16,xs:24},{default:a(()=>[e(E,{class:"hidden-sm-and-down"}),e(O)]),_:1})]),_:1}),e(w)]),_:1},8,["style"])]),_:1})}}});const U=y(P,[["__scopeId","data-v-64942115"]]),z=d({__name:"disable",setup(i){return(l,u)=>{const r=n("el-alert"),s=n("el-col"),o=n("el-row"),t=n("el-scrollbar"),_=n("el-container");return m(),p(_,{class:"is-vertical"},{default:a(()=>[e(v),e(t,{style:b(f(x)()),ref:"mainScrollbarRef"},{default:a(()=>[e(o,{class:"frontend-footer-brother",justify:"center"},{default:a(()=>[e(s,{class:"user-layouts",span:16,xs:24},{default:a(()=>[e(r,{center:!0,title:l.$t("Member center disabled"),type:"error"},null,8,["title"])]),_:1})]),_:1}),e(w)]),_:1},8,["style"])]),_:1})}}});const V=y(z,[["__scopeId","data-v-e004cd2e"]]),W={components:{Default:U,Disable:V}},te=d({...W,__name:"user",setup(i){const{t:l}=k(),u=H(),r=T(),s=C(),o=M();return A(t=>{o.setActiveRoute(t)}),D(async()=>{const t=await J();if(t.type!="break"){if(t.type=="reload")return window.location.href=t.url;if(!s.token)return r.push({name:"userLogin"});I().then(_=>{if(_.data.userInfo.refreshToken=s.refreshToken,s.dataFill(_.data.userInfo),_.data.menus){if(j(_.data.menus,_.data.rules),t.type=="jump")return r.push(t.url);if(u.params.to){const c=JSON.parse(u.params.to);if(c.path!=S.path){let R=F(c.query)?{}:c.query;B({path:c.path,query:R});return}}if(u.name=="userMainLoading"){let c=N(o.state.viewRoutes);c?r.push({path:c.path}):$({type:"error",message:l("No route found to jump~")})}}}),document.body.clientWidth<1024?o.setShrink(!0):o.setShrink(!1)}}),(t,_)=>(m(),p(h(f(o).state.layoutMode)))}});export{te as default};
|