school.fd2ed185.js 1.5 KB

1
  1. import{d as u,r as f,b as o,c as a,a as h,T as m,F as l,V as g,A as w,h as v,i as y,p as C,k as A,e as i,f as n,g as s,j as d}from"./index.332c7f08.js";function S(){import("data:text/javascript,")}var H=u({name:"App",setup(){const e=f({showToast:!1,showToastCenter:!1});return o.on("toastShow",t=>{t==="center"&&(e.showToastCenter=!0),e.showToast=!0}),o.on("toastClose",t=>{e.showToast=!1,t==="center"&&setTimeout(()=>{e.showToastCenter=!1},300)}),o.on("toastStatus",()=>e.showToast),()=>a(l,null,[a(h("router-view"),null,null),a("div",{class:["appRootToast",e.showToastCenter?"appRootToastCenter":""]},[a(m,{show:e.showToast,"onUpdate:show":t=>e.showToast=t,overlay:!0,duration:3e4},{message:()=>a(l,null,[a(g,{class:"toastAnimate",animationData:w},null)])})])])}});const T=v(H).use(y);C({api:"getToken"}).then(e=>{console.log(e,"res");const t=e.content;t!=null&&t.accessToken&&A(t.tokenType+" "+t.accessToken)});i({api:"setBarStatus",content:{status:0}});i({api:"getNavHeight"},e=>{const{content:t}=e,c=t.dpi||2;if(t.navHeight){const r=t.navHeight/c;console.log(r,"navHeight"),s.navBarHeight=r}});i({api:"getVersion"},e=>{s.version=e.content.version});const p=window.paymentType;n().isTeacher||p==="TEACHER"?s.platformType="TEACHER":n().isStudent||p==="STUDENT"?s.platformType="STUDENT":n().isSchool||p==="SCHOOL"?s.platformType="SCHOOL":s.platformType="SCHOOL";s.platformType==="TEACHER"&&(s.platformApi="/api-teacher");s.platformType==="STUDENT"?s.platformApi="/api-student":s.platformApi="/api-school";T.use(d);T.mount("#app");export{S as __vite_legacy_guard};