index.23ba1a5c.js 1.3 KB

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