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 g}});var o=n(7327),a=n(4161),r=n(3643),i=n(7178),s=n(5402),u=n(2529);class l{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)&&r.Z.start(),e.interceptors.request.use((e=>e),(e=>{console.log(e),r.Z.done();const t={code:500,message:"系统运行异常,请联系管理员处理",data:null};return Promise.reject(t)})),e.interceptors.response.use((e=>{if(r.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,u.Z)().resetUser()}return e}),(e=>{console.log(e),r.Z.done();const t={code:500,message:"系统运行异常,请联系管理员处理",data:null};return Promise.reject(t)}))}createInstance(){const e=this.axiosObj;return a.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=l,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}),g=new c(d.$C,{tokenName:"Authorization",getTokenFun:s.LP})},3332:function(e,t,n){n.d(t,{CH:function(){return c},Kk:function(){return l},M$:function(){return a},RC:function(){return i},VB:function(){return r},bJ:function(){return s},zt:function(){return u}});var o=n(7053);const a=()=>o.MJ.axioseRquest({method:"get",url:"/open/qrcode/create"}),r=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"}),u=()=>o.Z9.axioseRquest({method:"get",url:"/api-auth/exit",headers:{"Content-Type":"x-www-form-urlencoded"}}),l=()=>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 a},Ct:function(){return r},dz:function(){return o},z:function(){return i}});const o="https://test.resource.colexiu.com/cbs-app",a="https://test.lexiaoya.cn",r="https://test.dayaedu.com",i="https://test.lexiaoya.cn/whiteboard-noCollab"},5402:function(e,t,n){n.d(t,{H6:function(){return r},LP:function(){return l},Ng:function(){return f},PL:function(){return u},YS:function(){return a},ex:function(){return m},gm:function(){return g},gy:function(){return d},o4:function(){return c}});var o=n(680);n(9564);let a=403;function r(e){a=e}const i="classroom-Token",s=7;let u=!0;function l(){return o.Z.get(i)&&"bearer "+o.Z.get(i)}function c(e){return u=!0,o.Z.set(i,e,{expires:s})}function d(){return u=!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 g(){return o.Z.remove(p)}},9327:function(e,t,n){n.d(t,{C2:function(){return s},Ds:function(){return o},IV:function(){return i},cn:function(){return r}});n(6229),n(7330),n(2062);const o=(e,t=600,n=!1)=>{let o,a,r,i,s;const u=function(){const l=(new Date).getTime()-a;t>l?o=window.setTimeout(u,t-l):(o=null,n||(i=e.apply(s,r)),o||(r=[],s=null))},l=function(...l){return s=this,r=l,a=(new Date).getTime(),o||(o=window.setTimeout(u,t),n&&(i=e.apply(s,r))),i};return l.cancel=function(){o&&clearTimeout(o),r=[],o=s=null},l};const a=(e="")=>e.split(" ").filter((e=>!!e.trim())),r=(e,t)=>{e&&e.classList.add(...a(t))},i=(e,t)=>{e&&e.classList.remove(...a(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]}}},8176:function(e,t,n){var o=n(9242),a=n(3396);function r(e,t){const n=(0,a.up)("router-view");return(0,a.wg)(),(0,a.j4)(n)}var i=n(89);const s={},u=(0,i.Z)(s,[["render",r]]);var l=u,c=n(4851),d=n(7627),p=e=>{e.use(c.Z),(0,d.Z)(e)},f=n(9981),m=n(812),g=n(2594),h=n(3332),v=n(2771);const y=(0,g.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,v.hk)(h.RC,e);return 200===t.code?(this.cache.set(e,t.data),t.data):[]}}}});var b=()=>y(d.h),w=(0,a.aZ)({__name:"dictionary",props:{modelValue:{},options:{},clearable:{type:Boolean,default:!0},propsOpt:{default:()=>({})},dictionaryKey:{},disabled:{type:Boolean},size:{},placeholder:{}},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=e,o=b(),r={emitPath:!!Array.isArray(n.modelValue),lazy:!!n.dictionaryKey,leaf:"haveChild",async lazyLoad({level:e,data:t},a){const r=await o.getDictionary(0===e?n.dictionaryKey:t.itemdetailid);a(r)}};Object.assign(r,n.propsOpt);const i=(0,a.Fl)({get(){return n.modelValue},set(e){t("update:modelValue",e),t("change",e)}});return(e,t)=>{const o=(0,a.up)("el-cascader");return(0,a.wg)(),(0,a.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,filterable:"",options:n.options,props:r,clearable:n.clearable,placeholder:e.placeholder},null,8,["modelValue","disabled","size","options","clearable","placeholder"])}}});const A=w;var _=A,x=_,k=n(7139),Z=n(4870),C=(0,a.aZ)({__name:"tooltipAutoShow",props:{title:{},placement:{default:"top"},maxWidth:{default:250}},setup(e){const t=e,n=(0,Z.iH)(),o=(0,Z.iH)(!1);function r(e){const t=e.target;t.clientWidth<t.scrollWidth?o.value=!1:o.value=!0}return(0,a.bv)((()=>{n.value?.addEventListener("mouseenter",r)})),(0,a.Ah)((()=>{n.value?.removeEventListener("mouseenter",r)})),(e,r)=>{const i=(0,a.up)("el-tooltip");return(0,a.wg)(),(0,a.j4)(i,{placement:t.placement,disabled:o.value},{content:(0,a.w5)((()=>[(0,a._)("div",{style:(0,k.j5)({width:`${t.maxWidth}px`})},(0,k.zw)(t.title),5)])),default:(0,a.w5)((()=>[(0,a._)("div",{ref_key:"tooltipDom",ref:n,class:"tooltipAutoShow"},(0,k.zw)(t.title),513)])),_:1},8,["placement","disabled"])}}});const R=(0,i.Z)(C,[["__scopeId","data-v-611285fe"]]);var z=R,U=z,P=(0,a.aZ)({__name:"trigger",props:{mode:{}},setup(e){const t=e,n=(0,a.Fl)((()=>"vertical"===t.mode));return(e,t)=>((0,a.wg)(),(0,a.iD)("div",{class:(0,k.C_)(["trigger",[n.value?"trigger-vertical":"trigger-horizontal"]])},[(0,a._)("div",{class:(0,k.C_)(["bar-con",[n.value?"vertical":"horizontal"]])},[t[0]||((0,a.qZ)(-1),t[0]=((0,a.wg)(),(0,a.iD)(a.HY,null,(0,a.Ko)(8,(e=>(0,a._)("i",{class:"bar",key:e}))),64)),(0,a.qZ)(1),t[0])],2)],2))}});const M=(0,i.Z)(P,[["__scopeId","data-v-2bf8523c"]]);var O=M;const S={key:0,class:"cover"};var T=(0,a.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,a.bv)((()=>{g(),window.addEventListener("resize",g)})),(0,a.Jd)((()=>{window.removeEventListener("resize",g)})),(0,a.YP)((()=>n.modelValue),(()=>{m()}));const o=(0,Z.iH)(),r=(0,Z.Um)({initOffset:0,offset:0,oldOffset:0,isMoving:!1,computedMin:0,computedMax:0}),i=(0,a.Fl)((()=>"horizontal"===n.mode)),s=(0,a.Fl)((()=>100-r.offset)),u=(0,a.Fl)((()=>"string"===typeof n.modelValue)),l=(0,a.Fl)((()=>i.value?"offsetWidth":"offsetHeight"));function c(e){r.initOffset=i.value?e.pageX:e.pageY,r.oldOffset="string"===typeof n.modelValue?parseFloat(n.modelValue):n.modelValue,r.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,a=n-r.initOffset,s=o.value[l.value],c=u.value?r.oldOffset+a:b(s*r.oldOffset+a,s);f(c),t("on-moving",e)}function p(){r.isMoving=!1,document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",p),t("on-move-end")}function f(e){const n=v(e);e<=r.computedMin&&(e=r.computedMin),n<=r.computedMax&&(e=v(r.computedMax)),t("update:modelValue",u.value?e+"":e)}function m(){(0,a.Y3)((()=>{r.offset=1e4*(u.value?b(n.modelValue,o.value[l.value]):n.modelValue)/100}))}function g(){h(),f("string"===typeof n.modelValue?parseFloat(n.modelValue):n.modelValue),m(),t("on-resize-change")}function h(){const e=o.value[l.value];let t=y("min"),n=y("max");v(t+n)<0&&(t=u.value?.1*e:.1,n=u.value?.1*e:.1),r.computedMin=t,r.computedMax=n}function v(e){return u.value?o.value[l.value]-e:1-e}function y(e){const t=o.value[l.value],a=n[e];return u.value?"string"===typeof a?parseFloat(a):t*a:"string"===typeof a?b(a,t):a}function b(e,t){return parseFloat("number"===typeof e?e+"":e)/parseFloat("number"===typeof t?t+"":t)}return(e,t)=>((0,a.wg)(),(0,a.iD)("div",{ref_key:"splitDom",ref:o,class:(0,k.C_)(["split",[(0,Z.SU)(r).isMoving&&"no-select",i.value?"horizontal":"vertical"]])},[(0,Z.SU)(r).isMoving?((0,a.wg)(),(0,a.iD)("div",S)):(0,a.kq)("",!0),i.value?((0,a.wg)(),(0,a.iD)(a.HY,{key:1},[(0,a._)("div",{style:(0,k.j5)({right:`${s.value}%`}),class:(0,k.C_)(["left-pane pane",{"pane-moving":(0,Z.SU)(r).isMoving}])},[(0,a.WI)(e.$slots,"left")],6),(0,a._)("div",{class:"trigger-con",style:(0,k.j5)({left:`${(0,Z.SU)(r).offset}%`}),onMousedown:c},[(0,a.WI)(e.$slots,"trigger",{},(()=>[(0,a.Wm)(O,{mode:"vertical"})]))],36),(0,a._)("div",{style:(0,k.j5)({left:`${(0,Z.SU)(r).offset}%`}),class:(0,k.C_)(["right-pane pane",{"pane-moving":(0,Z.SU)(r).isMoving}])},[(0,a.WI)(e.$slots,"right")],6)],64)):((0,a.wg)(),(0,a.iD)(a.HY,{key:2},[(0,a._)("div",{style:(0,k.j5)({bottom:`${s.value}%`}),class:(0,k.C_)(["top-pane pane",{"pane-moving":(0,Z.SU)(r).isMoving}])},[(0,a.WI)(e.$slots,"top")],6),(0,a._)("div",{class:"trigger-con",style:(0,k.j5)({top:`${(0,Z.SU)(r).offset}%`}),onMousedown:c},[(0,a.WI)(e.$slots,"trigger",{},(()=>[(0,a.Wm)(O,{mode:"horizontal"})]))],36),(0,a._)("div",{style:(0,k.j5)({top:`${(0,Z.SU)(r).offset}%`}),class:(0,k.C_)(["bottom-pane pane",{"pane-moving":(0,Z.SU)(r).isMoving}])},[(0,a.WI)(e.$slots,"bottom")],6)],64))],2))}});const j=(0,i.Z)(T,[["__scopeId","data-v-0322fd07"]]);var V=j,E=V,B=n(9327),L=(0,a.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,a.YP)([()=>t.disabled,()=>t.text,()=>t.height,()=>t.length,()=>t.lines],(()=>{u()})),(0,a.bv)((()=>{s()}));const n=(0,Z.iH)(),r=(0,Z.iH)(),i=(0,Z.Um)({oversize:!1,computedReady:!1,key:0});function s(){t.disabled||l()}function u(){i.key++,s()}function l(){i.oversize=!1,i.computedReady=!1,(0,a.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)(r.value,"lineHeight"));o=e*s}r.value.offsetHeight>o&&(i.oversize=!0,(0,a.Y3)((()=>{while(r.value.offsetHeight>o)r.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 u=(0,a.up)("el-tooltip");return(0,a.wg)(),(0,a.j4)(u,{placement:t.placement,disabled:!(0,Z.SU)(i).oversize||!t.tooltip},{content:(0,a.w5)((()=>[(0,a._)("div",{style:(0,k.j5)({maxWidth:`${t.maxWidth}px`})},(0,k.zw)(t.text),5)])),default:(0,a.w5)((()=>[((0,a.wg)(),(0,a.iD)("div",{ref_key:"ellipsisDom",ref:r,class:(0,k.C_)(["ellipsis",{vis:!(0,Z.SU)(i).computedReady}]),key:(0,Z.SU)(i).key},[(0,a._)("span",{ref_key:"textDom",ref:n},(0,k.zw)(t.text),513),(0,a.wy)((0,a._)("span",null,"...",512),[[o.F8,(0,Z.SU)(i).oversize]])],2))])),_:1},8,["placement","disabled"])}}});const D=(0,i.Z)(L,[["__scopeId","data-v-2c14fbdc"]]);var I=D,W=I,Y=e=>{e.use(f.Z,{locale:m.Z}),e.component("dictionary",x),e.component("tooltipAutoShow",U),e.component("split",E),e.component("ellipsis",W)};const F=(0,o.ri)(l);p(F),Y(F),F.mount("#app")},2771:function(e,t,n){n.d(t,{hk:function(){return w},Jj:function(){return A}});var o=n(3396),a=n(7139),r=n(9242),i=n.p+"img/loading.b17515ef.gif";const s=e=>((0,o.dD)("data-v-7736856e"),e=e(),(0,o.Cn)(),e),u={class:"loading-bar"},l={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",u,[(0,o._)("div",l,[c,(0,o._)("span",null,(0,a.zw)(e.loadingBarData.text),1)])],512)),[[r.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="正在加载中...",a=(a,r)=>{e.text=r??o,e.show=a,e.show?(0,f.cn)(t,n):(0,f.IV)(t,n)};return{loadingBarData:e,loading:a}}}),g=n(89);const h=(0,g.Z)(m,[["render",d],["__scopeId","data-v-7736856e"]]);var v=h;const y=(0,o.h)(v);(0,r.sY)(y,document.body);y.component.proxy;var b=n(7178);const w=function(e,...t){return new Promise((n=>{e(...t).then((e=>{n(e.data)})).catch((e=>{n(e)}))}))},A=function(e,...t){return new Promise((n=>{e(...t).then((e=>{const t=e.data;200!==t.code&&(0,b.z8)({showClose:!0,message:t.message,type:"error"}),n(e.data)})).catch((e=>{(0,b.z8)({showClose:!0,message:e.message,type:"error"}),n(e)}))}))}},3643:function(e,t,n){var o=n(530),a=n.n(o);a().configure({easing:"ease",speed:500,showSpinner:!1,trickleSpeed:200,minimum:.3}),t.Z=a()},4851:function(e,t,n){n.d(t,{Z:function(){return F},P:function(){return Y}});n(7658);var o=n(2483),a=n(3396),r=n(7139),i="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAGCAYAAAD68A/GAAAAAXNSR0IArs4c6QAAAKVJREFUGFdtzkELAVEUBeBzXsrK0h+YkV9godgoq8dG01j7dTaaWAxSsrL1B9RM9jbKCtM7eiOi3N059+t2Gdo4JdWGSBAQQAoC4SA5AQ5AysCOmgaVPYg6/oyE0/1x69DvAhu1DLkDWPuxwtmh6Oar+bGEJR5EfQOmAKuvRleBvWw5O/j0gT40bDQWzZRQ4QoN802yfR/6gb4MbTyB3CVbJ4vvN56pKjgtPqkZxgAAAABJRU5ErkJggg==",s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAXCAYAAAAP6L+eAAAAAXNSR0IArs4c6QAAAtdJREFUSEu9lW1LVFEQx/+zd9UtepFWpiYkBD1wkV3PySKTKIvwVZTSkxb0GaKPEX2GoLRStOiVRGWEGWVz3ItcrCAwsCdL7UXUVffuxJFVdtdVtqDOq8ucmd85d2b+cwj/aFGx3IaGhnPWd3R09HYxMUWDtdYfLZCZa/4arLUuSaVSDZ7nvVyCKKW+2G9jzNYlWzwe3xeNRkeZeSH/sBU3dl23KhaL3QOwX0SOGmMe26B8sFKqhYgeAXgRBMFJ3/c/Z8NzwIlEYmMkEhkmoj0iMjA3N3fa9/0fhcCu624oKyvrJaJWERlPp9NNyWTy+xI8B6yUukNEZwB0M/NFAOm1UgEgorW+AaBDRHqMMWdXgBOJRJPjOEMi8npmZkZNTEwE2b9WKMd2v66uLlZRUWGIaHcYhs3JZHLY2pdvrJS6SUSdItJujOnPL8Zq4Eya2oioT0S6jDEXcsBa628i4hBRZaEqrwW2XSQiU0QUMvPmZXCmEz4BeMLMRwr16Vpg66+1HgRwOAiCatshi6mIx+M7o9HoGxHpN8a0FwJrrd9nBLJ9lYP7iKgtlUrt8jzv7SJYa10NwCprkJlbCgVaMVh7tmiy/bTWtt/t39Yw86fl4mmtp0UkYozZAiBVjGyzfKJKqa9ElGbmTfnF6wZwXkTajDF3/wSslDpFRLaTbjFzRz64GcBTq6Kpqam9k5OTv4qB19bWrqusrHxl1QrgEDMP5YAzue4BcDqjos4iUmJT0JVRay8zW9UurhxJ19fXl5eWlj4DYGfFwzAML3me92GVYm5zHOc6ER0DMD4/P39wbGxstiDYGhsbG6vCMLxPRI0Aftq8EdHAwsLCO7tfUlKyQ0RabT0ArBeREcdxToyMjKw+3ZZOc123NBaLXQZwBcBilQusaQBXgyC45vv+fP7+mi+IHTDl5eXHARwgolobLCKTAJ7Pzs4+yB9U2fCin6ZiOuS/gH8DGJdJJ8u7eLUAAAAASUVORK5CYII=",u=n(2529),l=n(4870),c=n(7178);const d=e=>((0,a.dD)("data-v-319313b8"),e=e(),(0,a.Cn)(),e),p={class:"layout"},f={class:"head"},m={class:"avatar"},g={class:"imgCon"},h={class:"name"},v={class:"dropdown"},y={class:"avatar-item"},b={class:"userInfo"},w={class:"realName"},A={class:"phone"},_=d((()=>(0,a._)("img",{src:s},null,-1))),x=d((()=>(0,a._)("div",{class:"text"},"退出登录",-1))),k=[_,x];var Z=(0,a.aZ)({__name:"layout",setup(e){const t=(0,u.Z)(),o=(0,a.Fl)((()=>t.userInfo)),s=(0,l.iH)(!1);function d(e){s.value=e}function _(){(0,u.Z)().loginOut().then().catch((e=>{c.z8.error(e.message)}))}return(e,t)=>{const u=(0,a.up)("el-image"),l=(0,a.up)("el-dropdown"),c=(0,a.up)("RouterView");return(0,a.wg)(),(0,a.iD)("div",p,[(0,a._)("div",f,[(0,a.Wm)(l,{"popper-options":{},"popper-class":"headDropdown",class:"avatar-con",trigger:"click",onVisibleChange:d},{dropdown:(0,a.w5)((()=>[(0,a._)("div",v,[(0,a._)("div",y,[(0,a.Wm)(u,{class:"avatarImg",src:o.value.avatar||n(4789)},null,8,["src"]),(0,a._)("div",b,[(0,a._)("div",w,(0,r.zw)(o.value.username),1),(0,a._)("div",A,(0,r.zw)(o.value.phone),1)])]),(0,a._)("div",{class:"logout-item"},[(0,a._)("div",{class:"logoutBtn",onClick:_},k)])])])),default:(0,a.w5)((()=>[(0,a._)("div",m,[(0,a._)("div",g,[(0,a.Wm)(u,{class:"avatarImg",src:o.value.avatar||n(4789)},null,8,["src"])]),(0,a._)("div",h,(0,r.zw)(o.value.username),1),(0,a._)("img",{class:(0,r.C_)(["horn",{isVisible:s.value}]),src:i},null,2)])])),_:1})]),(0,a.Wm)(c)])}}}),C=n(89);const R=(0,C.Z)(Z,[["__scopeId","data-v-319313b8"]]);var z=R,U=z,P={homePage_gym:()=>Promise.all([n.e(528),n.e(70)]).then(n.bind(n,3691)),homePage_gyt:()=>Promise.all([n.e(528),n.e(205)]).then(n.bind(n,8542)),cloudTextbooks:()=>n.e(763).then(n.bind(n,3763)),coursewarePlay:()=>n.e(185).then(n.bind(n,9291))};const M=[{path:"/login",name:"login",component:()=>n.e(230).then(n.bind(n,2444))}],O={...P,layout:U};var S=n(3643),T=n(5402);const j=(e,t)=>({asyncRoutes:V(e,t)}),V=(e,t)=>{function o(e){const n=[],a=[];for(const r of e){const{path:e,component:i,meta:s}=r;if(r.children&&r.children.length>0){const e=o(r.children);n.push(...e.layoutRoutes),a.push(...e.singlepageRoutes)}else("layout"===s.routeType?n:a).push({path:e,name:i,component:t[i],meta:s})}return{layoutRoutes:n,singlepageRoutes:a}}const{layoutRoutes:a,singlepageRoutes:r}=o(e),i=[{path:"/layout",name:"layout",redirect:"/noRedirect",component:t["layout"],children:a},...r];function s(e){const t=e[0];return t?t.children&&t.children.length?s(t.children):t.path:"/noRedirect"}const u=s(e);return i.push({path:"/",redirect:u}),i.push({path:"/:pathMatch(.*)*",name:"errorPage",component:()=>n.e(721).then(n.bind(n,8721))}),i},E=(0,u.Z)(),B=(0,o.p7)({history:(0,o.r5)("/"),routes:M,scrollBehavior(){return{left:0,top:0}}});function L(e,t){return e.findIndex((e=>e.test(t)))>-1}const D=["/login"],I=[];let W=[];B.beforeEach(((e,t,n)=>{S.Z.start();const o=(0,T.LP)();if(o&&!D.includes(e.path)){const t=E.roles;t?n():E.getUserInfo().then((t=>{const{asyncRoutes:o}=j(t,O);o.map((e=>{W.push(B.addRoute(e))})),n({...e,replace:!0})})).catch((e=>{e.code!==T.YS&&(c.z8.error(e.message),E.resetUser())}))}else D.includes(e.path)||L(I,e.path)?n():n({path:"/login"})})),B.afterEach((()=>{S.Z.done()}));const Y=()=>{W.map((e=>{e()})),W=[]};var F=B},7627:function(e,t,n){n.d(t,{h:function(){return a}});var o=n(2594);const a=(0,o.WB)();t.Z=e=>{e.use(a)}},2529:function(e,t,n){n.d(t,{Z:function(){return p}});n(7658);var o=n(2594),a=n(7627),r=n(3332),i=n(5402),s=n(4851),u=n(2771);const l=[{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,u.hk)("GYM"===e?r.bJ:r.Kk);return 200!==t.code?Promise.reject(t):e?(this.userInfo=f(e,t.data),this.roles=e,Promise.resolve("GYM"===e?c:l)):Promise.reject({code:"500",data:null,message:"获取用户信息出错,请联系管理员!"})},async loginOut(){const e=await(0,u.hk)("GYM"===this.roles?r.zt:r.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(a.h);function f(e,t){let n,o,a,r;return"GYM"===e?(n=t.avatar,o=t.username,a=t.realName,r=t.phone):(n=t.avatar,o=t.nickname,a=t.realName,r=t.phone),{avatar:n,username:o,realName:a,phone:r}}},4789:function(e,t,n){e.exports=n.p+"img/userImg.661e0058.png"}},t={};function n(o){var a=t[o];if(void 0!==a)return a.exports;var r=t[o]={exports:{}};return e[o].call(r.exports,r,r.exports,n),r.exports}n.m=e,function(){n.amdO={}}(),function(){var e=[];n.O=function(t,o,a,r){if(!o){var i=1/0;for(c=0;c<e.length;c++){o=e[c][0],a=e[c][1],r=e[c][2];for(var s=!0,u=0;u<o.length;u++)(!1&r||i>=r)&&Object.keys(n.O).every((function(e){return n.O[e](o[u])}))?o.splice(u--,1):(s=!1,r<i&&(i=r));if(s){e.splice(c--,1);var l=a();void 0!==l&&(t=l)}}return t}r=r||0;for(var c=e.length;c>0&&e[c-1][2]>r;c--)e[c]=e[c-1];e[c]=[o,a,r]}}(),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+"."+{70:"cac9c20b",185:"6e59bf48",205:"d071dec0",230:"a247dc58",528:"d8693d0f",721:"8103a789",763:"8cc4fdd8"}[e]+".js"}}(),function(){n.miniCssF=function(e){return"css/"+e+"."+{70:"4feb1675",185:"5d87d5c6",205:"3232b409",230:"ba82a5d0",721:"5e32f5d3",763:"b734ef2c"}[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,a,r,i){if(e[o])e[o].push(a);else{var s,u;if(void 0!==r)for(var l=document.getElementsByTagName("script"),c=0;c<l.length;c++){var d=l[c];if(d.getAttribute("src")==o||d.getAttribute("data-webpack")==t+r){s=d;break}}s||(u=!0,s=document.createElement("script"),s.charset="utf-8",s.timeout=120,n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",t+r),s.src=o),e[o]=[a];var p=function(t,n){s.onerror=s.onload=null,clearTimeout(f);var a=e[o];if(delete e[o],s.parentNode&&s.parentNode.removeChild(s),a&&a.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),u&&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,a){var r=document.createElement("link");r.rel="stylesheet",r.type="text/css";var i=function(n){if(r.onerror=r.onload=null,"load"===n.type)o();else{var i=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.href||t,u=new Error("Loading CSS chunk "+e+" failed.\n("+s+")");u.code="CSS_CHUNK_LOAD_FAILED",u.type=i,u.request=s,r.parentNode&&r.parentNode.removeChild(r),a(u)}};return r.onerror=r.onload=i,r.href=t,n?n.parentNode.insertBefore(r,n.nextSibling):document.head.appendChild(r),r},t=function(e,t){for(var n=document.getElementsByTagName("link"),o=0;o<n.length;o++){var a=n[o],r=a.getAttribute("data-href")||a.getAttribute("href");if("stylesheet"===a.rel&&(r===e||r===t))return a}var i=document.getElementsByTagName("style");for(o=0;o<i.length;o++){a=i[o],r=a.getAttribute("data-href");if(r===e||r===t)return a}},o=function(o){return new Promise((function(a,r){var i=n.miniCssF(o),s=n.p+i;if(t(i,s))return a();e(o,s,null,a,r)}))},a={143:0};n.f.miniCss=function(e,t){var n={70:1,185:1,205:1,230:1,721:1,763:1};a[e]?t.push(a[e]):0!==a[e]&&n[e]&&t.push(a[e]=o(e).then((function(){a[e]=0}),(function(t){throw delete a[e],t})))}}}(),function(){var e={143:0};n.f.j=function(t,o){var a=n.o(e,t)?e[t]:void 0;if(0!==a)if(a)o.push(a[2]);else{var r=new Promise((function(n,o){a=e[t]=[n,o]}));o.push(a[2]=r);var i=n.p+n.u(t),s=new Error,u=function(o){if(n.o(e,t)&&(a=e[t],0!==a&&(e[t]=void 0),a)){var r=o&&("load"===o.type?"missing":o.type),i=o&&o.target&&o.target.src;s.message="Loading chunk "+t+" failed.\n("+r+": "+i+")",s.name="ChunkLoadError",s.type=r,s.request=i,a[1](s)}};n.l(i,u,"chunk-"+t,t)}},n.O.j=function(t){return 0===e[t]};var t=function(t,o){var a,r,i=o[0],s=o[1],u=o[2],l=0;if(i.some((function(t){return 0!==e[t]}))){for(a in s)n.o(s,a)&&(n.m[a]=s[a]);if(u)var c=u(n)}for(t&&t(o);l<i.length;l++)r=i[l],n.o(e,r)&&e[r]&&e[r][0](),e[r]=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(8176)}));o=n.O(o)})();
|