school.888da941.js 1.4 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 y,j as C,k as A,e as n,f as t,i as g}from"./index.ffe80dbe.js";function S(){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);y({api:"getToken"}).then(e=>{console.log(e,"res");const s=e.content;s!=null&&s.accessToken&&C(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="SCHOOL";t.platformType==="TEACHER"&&(t.platformApi="/api-teacher");t.platformType==="STUDENT"?t.platformApi="/api-student":t.platformApi="/api-school";i.use(g);i.mount("#app");export{S as __vite_legacy_guard};