teacher.94cb02e3.js 1.3 KB

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