teacher.0a0883bf.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 v,h as w,i as C,p as y,k as A,e as i,f as n,g as s,j as H}from"./index.5f7ffb46.js";function E(){import("data:text/javascript,")}var d=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:v},null)])})])])}});const T=w(d).use(C);y({api:"getToken"}).then(e=>{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,console.log(e,"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="TEACHER";s.platformType==="TEACHER"?s.platformApi="/api-teacher":s.platformType==="SCHOOL"?s.platformApi="/api-school":s.platformApi="/api-student";T.use(H);T.mount("#app");export{E as __vite_legacy_guard};