1 |
- (function(){"use strict";var e={7053:function(e,t,n){n.d(t,{MJ:function(){return p},Wz:function(){return f},Z9:function(){return m},rO:function(){return v}});var o=n(7327),r=n(4161),a=n(3643),i=n(7178),s=n(5402),l=n(2529);class u{constructor(e,t){(0,o.Z)(this,"URL",""),(0,o.Z)(this,"axiosObj",void 0),this.URL=e,this.axiosObj=t}httpInterceptor(e){(!this.axiosObj||!1!==this.axiosObj.nprogress)&&a.Z.start(),e.interceptors.request.use((e=>e),(e=>{console.log(e),a.Z.done();const t={code:500,message:"系统运行异常,请刷新页面",data:null};return Promise.reject(t)})),e.interceptors.response.use((e=>{if(a.Z.done(),e.data.msg&&(e.data.message=e.data.msg),e.data.code===s.YS&&s.PL){const t=e.data;i.z8.error(t.message),(0,l.Z)().resetUser()}return e}),(e=>{console.log(e),a.Z.done();const t={code:500,message:"系统运行异常,请刷新页面",data:null};return Promise.reject(t)}))}createInstance(){const e=this.axiosObj;return r.Z.create(e?.tokenName?{baseURL:this.URL,headers:{[e.tokenName]:e.getTokenFun&&e.getTokenFun()}}:{baseURL:this.URL})}axioseRquest(e){const t=this.createInstance();return this.httpInterceptor(t),t(e)}}var c=u,d=n(6636);const p=new c(d.dz),f=new c(d.dz,{nprogress:!1}),m=new c(d.Ct,{tokenName:"Authorization",getTokenFun:s.LP}),v=new c(d.$C,{tokenName:"Authorization",getTokenFun:s.LP})},3332:function(e,t,n){n.d(t,{CH:function(){return c},Kk:function(){return u},M$:function(){return r},RC:function(){return i},VB:function(){return a},bJ:function(){return s},zt:function(){return l}});var o=n(7053);const r=()=>o.MJ.axioseRquest({method:"get",url:"/open/qrcode/create"}),a=e=>o.Wz.axioseRquest({method:"get",url:"/open/qrcode/query/"+e}),i=e=>o.MJ.axioseRquest({method:"get",url:"/api/v1/dictitem/getByValue",params:{value:e}}),s=()=>o.Z9.axioseRquest({method:"get",url:"/api-teacher/teacher/queryUserInfo"}),l=()=>o.Z9.axioseRquest({method:"get",url:"/api-auth/exit",headers:{"Content-Type":"x-www-form-urlencoded"}}),u=()=>o.rO.axioseRquest({method:"get",url:"/api-teacher/user/getUserInfo"}),c=()=>o.rO.axioseRquest({method:"get",url:"/api-teacher/user/logout"})},6636:function(e,t,n){n.d(t,{$C:function(){return r},Ct:function(){return a},dz:function(){return o},z:function(){return i}});const o="https://mec.colexiu.com/cbs-app",r="https://online.lexiaoya.cn",a="https://online.dayaedu.com",i="https://online.lexiaoya.cn/whiteboard-noCollab"},5402:function(e,t,n){n.d(t,{H6:function(){return a},LP:function(){return u},Ng:function(){return f},PL:function(){return l},YS:function(){return r},ex:function(){return m},gm:function(){return v},gy:function(){return d},o4:function(){return c}});var o=n(680);n(9564);let r=403;function a(e){r=e}const i="classroom-Token",s=7;let l=!0;function u(){return o.Z.get(i)&&"bearer "+o.Z.get(i)}function c(e){return l=!0,o.Z.set(i,e,{expires:s})}function d(){return l=!1,o.Z.remove(i)}const p="userType";function f(){return o.Z.get(p)}function m(e){return o.Z.set(p,e,{expires:s})}function v(){return o.Z.remove(p)}},1407:function(){const e=1920,t=10,n=document.documentElement;function o(){const o=n.getBoundingClientRect().width;n.style.fontSize=t*(o/e)+"px"}o(),window.addEventListener("resize",o)},9327:function(e,t,n){n.d(t,{C2:function(){return s},Ds:function(){return o},IV:function(){return i},cn:function(){return a}});n(6229),n(7330),n(2062);const o=(e,t=600,n=!1)=>{let o,r,a,i,s;const l=function(){const u=(new Date).getTime()-r;t>u?o=window.setTimeout(l,t-u):(o=null,n||(i=e.apply(s,a)),o||(a=[],s=null))},u=function(...u){return s=this,a=u,r=(new Date).getTime(),o||(o=window.setTimeout(l,t),n&&(i=e.apply(s,a))),i};return u.cancel=function(){o&&clearTimeout(o),a=[],o=s=null},u};const r=(e="")=>e.split(" ").filter((e=>!!e.trim())),a=(e,t)=>{e&&e.classList.add(...r(t))},i=(e,t)=>{e&&e.classList.remove(...r(t))},s=(e,t)=>{if(!e)return"";"float"===t&&(t="cssFloat");try{const n=e.style[t];if(n)return n;const o=document.defaultView?.getComputedStyle(e,"");return o?o[t]:""}catch{return e.style[t]}}},9915:function(e,t,n){var o=n(9242),r=n(3396);function a(e,t){const n=(0,r.up)("router-view");return(0,r.wg)(),(0,r.j4)(n)}var i=n(89);const s={},l=(0,i.Z)(s,[["render",a]]);var u=l,c=(n(1407),n(2195)),d=n(7627),p=e=>{e.use(c.Z),(0,d.Z)(e)},f=n(1934),m=n(812),v=n(2594),h=n(3332),g=n(2771);const y=(0,v.Q_)("dictionaryCache",{state:()=>({cache:new Map}),actions:{async getDictionary(e){const t=this.cache;if(t.has(e))return t.get(e);{const t=await(0,g.hk)(h.RC,e);return 200===t.code?(this.cache.set(e,t.data),t.data):[]}}}});var w=()=>y(d.h),A=(0,r.aZ)({__name:"dictionary",props:{modelValue:{},options:{},clearable:{type:Boolean,default:!0},propsOpt:{default:()=>({})},dictionaryKey:{},disabled:{type:Boolean},size:{},placeholder:{},popperClass:{}},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=e,o=w(),a={emitPath:!!Array.isArray(n.modelValue),lazy:!!n.dictionaryKey,leaf:"haveChild",async lazyLoad({level:e,data:t},r){const a=await o.getDictionary(0===e?n.dictionaryKey:t.itemdetailid);r(a)}};Object.assign(a,n.propsOpt);const i=(0,r.Fl)({get(){return n.modelValue},set(e){t("update:modelValue",e),t("change",e)}});return(e,t)=>{const o=(0,r.up)("el-cascader");return(0,r.wg)(),(0,r.j4)(o,{class:"dictionary",modelValue:i.value,"onUpdate:modelValue":t[0]||(t[0]=e=>i.value=e),disabled:n.disabled,size:n.size,"show-all-levels":!1,options:n.options,props:a,clearable:n.clearable,placeholder:e.placeholder,popperClass:e.popperClass},null,8,["modelValue","disabled","size","options","clearable","placeholder","popperClass"])}}});const b=A;var x=b,C=x,Z=n(7139),k=n(4870),S=(0,r.aZ)({__name:"tooltipAutoShow",props:{title:{},placement:{default:"top"},maxWidth:{default:250}},setup(e){const t=e,n=(0,k.iH)(),o=(0,k.iH)(!1);function a(e){const t=e.target;t.clientWidth<t.scrollWidth?o.value=!1:o.value=!0}return(0,r.bv)((()=>{n.value?.addEventListener("mouseenter",a)})),(0,r.Ah)((()=>{n.value?.removeEventListener("mouseenter",a)})),(e,a)=>{const i=(0,r.up)("el-tooltip");return(0,r.wg)(),(0,r.j4)(i,{placement:t.placement,disabled:o.value},{content:(0,r.w5)((()=>[(0,r._)("div",{style:(0,Z.j5)({width:`${t.maxWidth}px`})},(0,Z.zw)(t.title),5)])),default:(0,r.w5)((()=>[(0,r._)("div",{ref_key:"tooltipDom",ref:n,class:"tooltipAutoShow"},(0,Z.zw)(t.title),513)])),_:1},8,["placement","disabled"])}}});const _=(0,i.Z)(S,[["__scopeId","data-v-611285fe"]]);var L=_,j=L,M=(0,r.aZ)({__name:"trigger",props:{mode:{}},setup(e){const t=e,n=(0,r.Fl)((()=>"vertical"===t.mode));return(e,t)=>((0,r.wg)(),(0,r.iD)("div",{class:(0,Z.C_)(["trigger",[n.value?"trigger-vertical":"trigger-horizontal"]])},[(0,r._)("div",{class:(0,Z.C_)(["bar-con",[n.value?"vertical":"horizontal"]])},[t[0]||((0,r.qZ)(-1),t[0]=((0,r.wg)(),(0,r.iD)(r.HY,null,(0,r.Ko)(8,(e=>(0,r._)("i",{class:"bar",key:e}))),64)),(0,r.qZ)(1),t[0])],2)],2))}});const z=(0,i.Z)(M,[["__scopeId","data-v-2bf8523c"]]);var I=z;const E={key:0,class:"cover"};var U=(0,r.aZ)({__name:"split",props:{modelValue:{default:.5},mode:{default:"horizontal"},min:{default:"40"},max:{default:"40"}},emits:["update:modelValue","on-move-start","on-moving","on-move-end","on-resize-change"],setup(e,{emit:t}){const n=e;(0,r.bv)((()=>{v(),window.addEventListener("resize",v)})),(0,r.Jd)((()=>{window.removeEventListener("resize",v)})),(0,r.YP)((()=>n.modelValue),(()=>{m()}));const o=(0,k.iH)(),a=(0,k.Um)({initOffset:0,offset:0,oldOffset:0,isMoving:!1,computedMin:0,computedMax:0}),i=(0,r.Fl)((()=>"horizontal"===n.mode)),s=(0,r.Fl)((()=>100-a.offset)),l=(0,r.Fl)((()=>"string"===typeof n.modelValue)),u=(0,r.Fl)((()=>i.value?"offsetWidth":"offsetHeight"));function c(e){a.initOffset=i.value?e.pageX:e.pageY,a.oldOffset="string"===typeof n.modelValue?parseFloat(n.modelValue):n.modelValue,a.isMoving=!0,document.addEventListener("mousemove",d),document.addEventListener("mouseup",p),t("on-move-start")}function d(e){const n=i.value?e.pageX:e.pageY,r=n-a.initOffset,s=o.value[u.value],c=l.value?a.oldOffset+r:w(s*a.oldOffset+r,s);f(c),t("on-moving",e)}function p(){a.isMoving=!1,document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",p),t("on-move-end")}function f(e){const n=g(e);e<=a.computedMin&&(e=a.computedMin),n<=a.computedMax&&(e=g(a.computedMax)),t("update:modelValue",l.value?e+"":e)}function m(){(0,r.Y3)((()=>{a.offset=1e4*(l.value?w(n.modelValue,o.value[u.value]):n.modelValue)/100}))}function v(){h(),f("string"===typeof n.modelValue?parseFloat(n.modelValue):n.modelValue),m(),t("on-resize-change")}function h(){const e=o.value[u.value];let t=y("min"),n=y("max");g(t+n)<0&&(t=l.value?.1*e:.1,n=l.value?.1*e:.1),a.computedMin=t,a.computedMax=n}function g(e){return l.value?o.value[u.value]-e:1-e}function y(e){const t=o.value[u.value],r=n[e];return l.value?"string"===typeof r?parseFloat(r):t*r:"string"===typeof r?w(r,t):r}function w(e,t){return parseFloat("number"===typeof e?e+"":e)/parseFloat("number"===typeof t?t+"":t)}return(e,t)=>((0,r.wg)(),(0,r.iD)("div",{ref_key:"splitDom",ref:o,class:(0,Z.C_)(["split",[(0,k.SU)(a).isMoving&&"no-select",i.value?"horizontal":"vertical"]])},[(0,k.SU)(a).isMoving?((0,r.wg)(),(0,r.iD)("div",E)):(0,r.kq)("",!0),i.value?((0,r.wg)(),(0,r.iD)(r.HY,{key:1},[(0,r._)("div",{style:(0,Z.j5)({right:`${s.value}%`}),class:(0,Z.C_)(["left-pane pane",{"pane-moving":(0,k.SU)(a).isMoving}])},[(0,r.WI)(e.$slots,"left")],6),(0,r._)("div",{class:"trigger-con",style:(0,Z.j5)({left:`${(0,k.SU)(a).offset}%`}),onMousedown:c},[(0,r.WI)(e.$slots,"trigger",{},(()=>[(0,r.Wm)(I,{mode:"vertical"})]))],36),(0,r._)("div",{style:(0,Z.j5)({left:`${(0,k.SU)(a).offset}%`}),class:(0,Z.C_)(["right-pane pane",{"pane-moving":(0,k.SU)(a).isMoving}])},[(0,r.WI)(e.$slots,"right")],6)],64)):((0,r.wg)(),(0,r.iD)(r.HY,{key:2},[(0,r._)("div",{style:(0,Z.j5)({bottom:`${s.value}%`}),class:(0,Z.C_)(["top-pane pane",{"pane-moving":(0,k.SU)(a).isMoving}])},[(0,r.WI)(e.$slots,"top")],6),(0,r._)("div",{class:"trigger-con",style:(0,Z.j5)({top:`${(0,k.SU)(a).offset}%`}),onMousedown:c},[(0,r.WI)(e.$slots,"trigger",{},(()=>[(0,r.Wm)(I,{mode:"horizontal"})]))],36),(0,r._)("div",{style:(0,Z.j5)({top:`${(0,k.SU)(a).offset}%`}),class:(0,Z.C_)(["bottom-pane pane",{"pane-moving":(0,k.SU)(a).isMoving}])},[(0,r.WI)(e.$slots,"bottom")],6)],64))],2))}});const P=(0,i.Z)(U,[["__scopeId","data-v-0322fd07"]]);var D=P,T=D,B=n(9327),R=(0,r.aZ)({__name:"ellipsis",props:{text:{},height:{},lines:{},length:{},disabled:{type:Boolean,default:!1},tooltip:{type:Boolean,default:!0},placement:{default:"top"},maxWidth:{default:250}},setup(e){const t=e;(0,r.YP)([()=>t.disabled,()=>t.text,()=>t.height,()=>t.length,()=>t.lines],(()=>{l()})),(0,r.bv)((()=>{s()}));const n=(0,k.iH)(),a=(0,k.iH)(),i=(0,k.Um)({oversize:!1,computedReady:!1,key:0});function s(){t.disabled||u()}function l(){i.key++,s()}function u(){i.oversize=!1,i.computedReady=!1,(0,r.Y3)((()=>{let e=t.text;const o=t.length;if(o){const t=e.length;t>o&&(i.oversize=!0,e=e.slice(0,o),n.value.innerText=e)}else if(t.lines||t.height){let o=t.height||0;const s=t.lines;if(!o&&s){const e=parseInt((0,B.C2)(a.value,"lineHeight"));o=e*s}a.value.offsetHeight>o&&(i.oversize=!0,(0,r.Y3)((()=>{while(a.value.offsetHeight>o)a.value.offsetHeight>3*o?n.value.innerText=e=e.substring(0,Math.floor(e.length/2)):n.value.innerText=e=e.substring(0,e.length-1)})))}i.computedReady=!0}))}return(e,s)=>{const l=(0,r.up)("el-tooltip");return(0,r.wg)(),(0,r.j4)(l,{placement:t.placement,disabled:!(0,k.SU)(i).oversize||!t.tooltip},{content:(0,r.w5)((()=>[(0,r._)("div",{style:(0,Z.j5)({maxWidth:`${t.maxWidth}px`})},(0,Z.zw)(t.text),5)])),default:(0,r.w5)((()=>[((0,r.wg)(),(0,r.iD)("div",{ref_key:"ellipsisDom",ref:a,class:(0,Z.C_)(["ellipsis",{vis:!(0,k.SU)(i).computedReady}]),key:(0,k.SU)(i).key},[(0,r._)("span",{ref_key:"textDom",ref:n},(0,Z.zw)(t.text),513),(0,r.wy)((0,r._)("span",null,"...",512),[[o.F8,(0,k.SU)(i).oversize]])],2))])),_:1},8,["placement","disabled"])}}});const O=(0,i.Z)(R,[["__scopeId","data-v-2c14fbdc"]]);var H=O,q=H,V=(0,r.aZ)({__name:"ellipsisScroll",props:{title:{}},setup(e){const t=e,n=(0,k.iH)(),o=(0,k.iH)(!1);(0,r.bv)((()=>{n.value?.addEventListener("mouseenter",i),n.value?.addEventListener("mouseleave",s)})),(0,r.Ah)((()=>{n.value?.removeEventListener("mouseenter",i),n.value?.removeEventListener("mouseleave",s)}));let a=0;function i(e){const t=e.target;a=t.scrollWidth-t.clientWidth,o.value=a>0}function s(){o.value=!1}return(e,a)=>((0,r.wg)(),(0,r.iD)("div",{ref_key:"ellipsisScrollDom",ref:n,class:(0,Z.C_)([{isScroll:o.value},"ellipsisScroll"])},(0,Z.zw)(t.title),3))}});const F=(0,i.Z)(V,[["__scopeId","data-v-0ec0e02d"]]);var Y=F,N=Y,J=e=>{e.use(f.Z,{locale:m.Z}),e.component("dictionary",C),e.component("tooltipAutoShow",j),e.component("split",T),e.component("ellipsis",q),e.component("ellipsisScroll",N)};const W=(0,o.ri)(u);p(W),J(W),W.mount("#app")},2771:function(e,t,n){n.d(t,{hk:function(){return A},Jj:function(){return b}});var o=n(3396),r=n(7139),a=n(9242),i=n.p+"img/loading.b17515ef.gif";const s=e=>((0,o.dD)("data-v-7736856e"),e=e(),(0,o.Cn)(),e),l={class:"loading-bar"},u={class:"loading-bar-content"},c=s((()=>(0,o._)("img",{src:i},null,-1)));function d(e,t,n,i,s,d){return(0,o.wy)(((0,o.wg)(),(0,o.iD)("div",l,[(0,o._)("div",u,[c,(0,o._)("span",null,(0,r.zw)(e.loadingBarData.text),1)])],512)),[[a.F8,e.loadingBarData.show]])}var p=n(4870),f=n(9327),m=(0,o.aZ)({setup(){const e=(0,p.Um)({text:"",show:!1}),t=document.querySelector("body"),n="loadingBarBody",o="正在加载中...",r=(r,a)=>{e.text=a??o,e.show=r,e.show?(0,f.cn)(t,n):(0,f.IV)(t,n)};return{loadingBarData:e,loading:r}}}),v=n(89);const h=(0,v.Z)(m,[["render",d],["__scopeId","data-v-7736856e"]]);var g=h;const y=(0,o.h)(g);(0,a.sY)(y,document.body);y.component.proxy;var w=n(7178);const A=function(e,...t){return new Promise((n=>{e(...t).then((e=>{n(e.data)})).catch((e=>{n(e)}))}))},b=function(e,...t){return new Promise((n=>{e(...t).then((e=>{const t=e.data;200!==t.code&&(0,w.z8)({showClose:!0,message:t.message,type:"error"}),n(e.data)})).catch((e=>{(0,w.z8)({showClose:!0,message:e.message,type:"error"}),n(e)}))}))}},3643:function(e,t,n){var o=n(530),r=n.n(o);r().configure({easing:"ease",speed:500,showSpinner:!1,trickleSpeed:200,minimum:.3}),t.Z=r()},2195:function(e,t,n){n.d(t,{Z:function(){return F},P:function(){return V}});n(7658);var o=n(2483),r=n(3396),a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9+yPUGb+zXXd1kwmYwYsw9aIcwnf9+cx8474fhpZH8jlcu21hkcUBqblDioLADlEXBAEwSel3mKSQco9zGymPvZeExarichMcBJ9OlkAphqYiZEpV3HM5ssuIi4LguCVkUKuLLAx9n3fQL9QoLR5ZNr4uv7+/q3lmkvUFExcmlYfl66YzSh7fzlYszkRcAQ9LwzDTQUxHR84AABdiJgJw9D0/TgxxzuOM5mZ09GQ254g5W1NzDqOs2SkMLAVTwxsjEwiMvN6Zr6lkh9b4hWbEHgHETtKJVjFSVcqlkydDsNwDSJeWwU4M/PHjuOsLVZny5XMihQudGbaeC6XWwQA8xHR/JcR3/IKt55gZtMYdqZSqS2F7bYcZNUhUcaxK4SYhIgXIuJZUXz+ycw/K6XMfaDSalL0uJoUrkSZeu09BVwvJavudKMNUKn/fwCWgpVNgMJnpAAAAABJRU5ErkJggg==",l=n(2529),u=n(4870),c=n(7178);const d=e=>((0,r.dD)("data-v-5ee76480"),e=e(),(0,r.Cn)(),e),p={class:"layout"},f={class:"head"},m={class:"avatar"},v={class:"imgCon"},h={class:"name"},g={class:"dropdown"},y={class:"avatar-item"},w={class:"userInfo"},A={class:"realName"},b={class:"phone"},x=d((()=>(0,r._)("img",{src:s},null,-1))),C=d((()=>(0,r._)("div",{class:"text"},"退出登录",-1))),Z=[x,C];var k=(0,r.aZ)({__name:"layout",setup(e){const t=(0,l.Z)(),o=(0,r.Fl)((()=>t.userInfo)),s=(0,u.iH)(!1);function d(e){s.value=e}function x(){(0,l.Z)().loginOut().then().catch((e=>{c.z8.error(e.message)}))}return(e,t)=>{const l=(0,r.up)("el-image"),u=(0,r.up)("ellipsisScroll"),c=(0,r.up)("el-dropdown"),C=(0,r.up)("RouterView");return(0,r.wg)(),(0,r.iD)("div",p,[(0,r._)("div",f,[(0,r.Wm)(c,{"popper-options":{},"popper-class":"headDropdown",class:"avatar-con",trigger:"click",onVisibleChange:d},{dropdown:(0,r.w5)((()=>[(0,r._)("div",g,[(0,r._)("div",y,[(0,r.Wm)(l,{class:"avatarImg",src:o.value.avatar||n(4789)},null,8,["src"]),(0,r._)("div",w,[(0,r._)("div",A,[(0,r.Wm)(u,{title:o.value.username||""},null,8,["title"])]),(0,r._)("div",b,(0,a.zw)(o.value.phone),1)])]),(0,r._)("div",{class:"logout-item"},[(0,r._)("div",{class:"logoutBtn",onClick:x},Z)])])])),default:(0,r.w5)((()=>[(0,r._)("div",m,[(0,r._)("div",v,[(0,r.Wm)(l,{class:"avatarImg",src:o.value.avatar||n(4789)},null,8,["src"])]),(0,r._)("div",h,[(0,r.Wm)(u,{title:o.value.username||""},null,8,["title"])]),(0,r._)("img",{class:(0,a.C_)(["horn",{isVisible:s.value}]),src:i},null,2)])])),_:1})]),(0,r.Wm)(C)])}}}),S=n(89);const _=(0,S.Z)(k,[["__scopeId","data-v-5ee76480"]]);var L=_,j=L,M={homePage_gym:()=>Promise.all([n.e(806),n.e(656)]).then(n.bind(n,7385)),homePage_gyt:()=>Promise.all([n.e(806),n.e(465)]).then(n.bind(n,9153)),cloudTextbooks:()=>n.e(471).then(n.bind(n,2471)),coursewarePlay:()=>Promise.all([n.e(365),n.e(901)]).then(n.bind(n,6600))};const z=[{path:"/login",name:"login",component:()=>n.e(392).then(n.bind(n,734))}],I={...M,layout:j};var E=n(3643),U=n(5402);const P=(e,t)=>({asyncRoutes:D(e,t)}),D=(e,t)=>{function o(e){const n=[],r=[];for(const a of e){const{path:e,component:i,meta:s}=a;if(a.children&&a.children.length>0){const e=o(a.children);n.push(...e.layoutRoutes),r.push(...e.singlepageRoutes)}else("layout"===s.routeType?n:r).push({path:e,name:i,component:t[i],meta:s})}return{layoutRoutes:n,singlepageRoutes:r}}const{layoutRoutes:r,singlepageRoutes:a}=o(e),i=[{path:"/layout",name:"layout",redirect:"/noRedirect",component:t["layout"],children:r},...a];function s(e){const t=e[0];return t?t.children&&t.children.length?s(t.children):t.path:"/noRedirect"}const l=s(e);return i.push({path:"/",redirect:l}),i.push({path:"/:pathMatch(.*)*",name:"errorPage",component:()=>Promise.all([n.e(365),n.e(77)]).then(n.bind(n,4012))}),i},T=(0,l.Z)(),B=(0,o.p7)({history:(0,o.r5)("/"),routes:z,scrollBehavior(){return{left:0,top:0}}});function R(e,t){return e.findIndex((e=>e.test(t)))>-1}const O=["/login"],H=[];let q=[];B.beforeEach(((e,t,n)=>{E.Z.start();const o=(0,U.LP)();if(o&&!O.includes(e.path)){const t=T.roles;t?n():T.getUserInfo().then((t=>{const{asyncRoutes:o}=P(t,I);o.map((e=>{q.push(B.addRoute(e))})),n({...e,replace:!0})})).catch((e=>{e.code!==U.YS&&(c.z8.error(e.message),T.resetUser())}))}else O.includes(e.path)||R(H,e.path)?n():n({path:"/login"})})),B.afterEach((()=>{E.Z.done()}));const V=()=>{q.map((e=>{e()})),q=[]};var F=B},7627:function(e,t,n){n.d(t,{h:function(){return r}});var o=n(2594);const r=(0,o.WB)();t.Z=e=>{e.use(r)}},2529:function(e,t,n){n.d(t,{Z:function(){return p}});n(7658);var o=n(2594),r=n(7627),a=n(3332),i=n(5402),s=n(2195),l=n(2771);const u=[{path:"/homePage_gyt",component:"homePage_gyt",title:"管乐团首页",icon:"",meta:{routeType:"layout"},children:[]},{path:"/cloudTextbooks",component:"cloudTextbooks",title:"云教材",icon:"",meta:{routeType:"layout"},children:[]},{path:"/coursewarePlay/:id",component:"coursewarePlay",title:"播放器",icon:"",meta:{routeType:"singlepage"},children:[]}],c=[{path:"/homePage_gym",component:"homePage_gym",title:"管乐迷首页",icon:"",meta:{routeType:"layout"},children:[]},{path:"/cloudTextbooks",component:"cloudTextbooks",title:"云教材",icon:"",meta:{routeType:"layout"},children:[]},{path:"/coursewarePlay/:id",component:"coursewarePlay",title:"播放器",icon:"",meta:{routeType:"singlepage"},children:[]}],d=(0,o.Q_)("user",{state:()=>({userInfo:{},roles:void 0}),actions:{async login({data:e,appKey:t}){return(0,i.o4)("GYM"===t?e:e.access_token),(0,i.ex)(t),Promise.resolve()},async getUserInfo(){const e=(0,i.Ng)();"GYM"!==e||(0,i.H6)(5e3);const t=await(0,l.hk)("GYM"===e?a.bJ:a.Kk);return 200!==t.code?Promise.reject(t):e?(this.userInfo=f(e,t.data),this.roles=e,Promise.resolve("GYM"===e?c:u)):Promise.reject({code:"500",data:null,message:"获取用户信息出错,请联系管理员!"})},async loginOut(){const e=await(0,l.hk)("GYM"===this.roles?a.zt:a.CH);return 200!==e.code?Promise.reject(e):(this.resetUser(),Promise.resolve(e))},resetUser(){this.userInfo={},this.roles=void 0,(0,i.gy)(),(0,i.gm)(),(0,s.P)(),s.Z.push({path:"/login"})}}});var p=()=>d(r.h);function f(e,t){let n,o,r,a;return"GYM"===e?(n=t.avatar,o=t.username,r=t.realName,a=t.phone):(n=t.avatar,o=t.nickname,r=t.realName,a=t.phone),{avatar:n,username:o,realName:r,phone:a}}},4789:function(e,t,n){e.exports=n.p+"img/userImg.661e0058.png"}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var a=t[o]={exports:{}};return e[o].call(a.exports,a,a.exports,n),a.exports}n.m=e,function(){n.amdO={}}(),function(){var e=[];n.O=function(t,o,r,a){if(!o){var i=1/0;for(c=0;c<e.length;c++){o=e[c][0],r=e[c][1],a=e[c][2];for(var s=!0,l=0;l<o.length;l++)(!1&a||i>=a)&&Object.keys(n.O).every((function(e){return n.O[e](o[l])}))?o.splice(l--,1):(s=!1,a<i&&(i=a));if(s){e.splice(c--,1);var u=r();void 0!==u&&(t=u)}}return t}a=a||0;for(var c=e.length;c>0&&e[c-1][2]>a;c--)e[c]=e[c-1];e[c]=[o,r,a]}}(),function(){n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,{a:t}),t}}(),function(){n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})}}(),function(){n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(t,o){return n.f[o](e,t),t}),[]))}}(),function(){n.u=function(e){return"js/"+e+"."+{77:"8ac2f211",365:"207cd5d1",392:"8cb7b349",465:"a67b4fd5",471:"7d84fdfc",656:"9c209970",806:"3294cf5c",901:"6dfee73c"}[e]+".js"}}(),function(){n.miniCssF=function(e){return"css/"+e+"."+{77:"e9a119a7",365:"67a2fae0",392:"4627fd47",465:"1a662b76",471:"6da0405d",656:"1dcc5f39",901:"9a69515b"}[e]+".css"}}(),function(){n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){var e={},t="classroom:";n.l=function(o,r,a,i){if(e[o])e[o].push(r);else{var s,l;if(void 0!==a)for(var u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var d=u[c];if(d.getAttribute("src")==o||d.getAttribute("data-webpack")==t+a){s=d;break}}s||(l=!0,s=document.createElement("script"),s.charset="utf-8",s.timeout=120,n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",t+a),s.src=o),e[o]=[r];var p=function(t,n){s.onerror=s.onload=null,clearTimeout(f);var r=e[o];if(delete e[o],s.parentNode&&s.parentNode.removeChild(s),r&&r.forEach((function(e){return e(n)})),t)return t(n)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=p.bind(null,s.onerror),s.onload=p.bind(null,s.onload),l&&document.head.appendChild(s)}}}(),function(){n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){n.p="/"}(),function(){if("undefined"!==typeof document){var e=function(e,t,n,o,r){var a=document.createElement("link");a.rel="stylesheet",a.type="text/css";var i=function(n){if(a.onerror=a.onload=null,"load"===n.type)o();else{var i=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.href||t,l=new Error("Loading CSS chunk "+e+" failed.\n("+s+")");l.code="CSS_CHUNK_LOAD_FAILED",l.type=i,l.request=s,a.parentNode&&a.parentNode.removeChild(a),r(l)}};return a.onerror=a.onload=i,a.href=t,n?n.parentNode.insertBefore(a,n.nextSibling):document.head.appendChild(a),a},t=function(e,t){for(var n=document.getElementsByTagName("link"),o=0;o<n.length;o++){var r=n[o],a=r.getAttribute("data-href")||r.getAttribute("href");if("stylesheet"===r.rel&&(a===e||a===t))return r}var i=document.getElementsByTagName("style");for(o=0;o<i.length;o++){r=i[o],a=r.getAttribute("data-href");if(a===e||a===t)return r}},o=function(o){return new Promise((function(r,a){var i=n.miniCssF(o),s=n.p+i;if(t(i,s))return r();e(o,s,null,r,a)}))},r={143:0};n.f.miniCss=function(e,t){var n={77:1,365:1,392:1,465:1,471:1,656:1,901:1};r[e]?t.push(r[e]):0!==r[e]&&n[e]&&t.push(r[e]=o(e).then((function(){r[e]=0}),(function(t){throw delete r[e],t})))}}}(),function(){var e={143:0};n.f.j=function(t,o){var r=n.o(e,t)?e[t]:void 0;if(0!==r)if(r)o.push(r[2]);else if(365!=t){var a=new Promise((function(n,o){r=e[t]=[n,o]}));o.push(r[2]=a);var i=n.p+n.u(t),s=new Error,l=function(o){if(n.o(e,t)&&(r=e[t],0!==r&&(e[t]=void 0),r)){var a=o&&("load"===o.type?"missing":o.type),i=o&&o.target&&o.target.src;s.message="Loading chunk "+t+" failed.\n("+a+": "+i+")",s.name="ChunkLoadError",s.type=a,s.request=i,r[1](s)}};n.l(i,l,"chunk-"+t,t)}else e[t]=0},n.O.j=function(t){return 0===e[t]};var t=function(t,o){var r,a,i=o[0],s=o[1],l=o[2],u=0;if(i.some((function(t){return 0!==e[t]}))){for(r in s)n.o(s,r)&&(n.m[r]=s[r]);if(l)var c=l(n)}for(t&&t(o);u<i.length;u++)a=i[u],n.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return n.O(c)},o=self["webpackChunkclassroom"]=self["webpackChunkclassroom"]||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))}();var o=n.O(void 0,[998],(function(){return n(9915)}));o=n.O(o)})();
|