index-legacy.d28bd0af.js 8.4 KB

1
  1. !function(){function e(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(l){return void n(l)}c.done?t(u):Promise.resolve(u).then(r,o)}var a=document.createElement("style");a.innerHTML="._error_l30mv_1{background-color:#fff;display:flex;flex-direction:column;min-height:100vh;align-items:center;justify-content:center}._error_l30mv_1 ._info_l30mv_9{display:flex;align-items:center;margin-bottom:.8rem}._error_l30mv_1 ._info_l30mv_9 span{display:inline-block;margin-left:.26667rem;color:#58727e;font-size:.48rem}._error_l30mv_1 .col-result-container,._error_l30mv_1 .van-empty{padding-top:0}._error_l30mv_1 .van-button{width:50%}\n",document.head.appendChild(a),System.register(["./index-legacy.e2aa9c88.js"],(function(t,n){"use strict";var o,a,c,u,l,s,m,f,p,d,h,v,g,y,b,j,x,_,w,O,E,A,P,R,T,S;return{setters:[function(e){o=e.d,a=e._,c=e.r,u=e.o,l=e.c,s=e.b,m=e.s,f=e.a,p=e.e,d=e.f,h=e.g,v=e.h,g=e.p,y=e.i,b=e.C,j=e.R,x=e.F,_=e.j,w=e.k,O=e.l,E=e.m,A=e.n,P=e.D,R=e.q,T=e.t,S=e.v}],execute:function(){var t=o({name:"App"});var k=a(t,[["render",function(e,t,n,r,o,i){var a=c("router-view");return u(),l(a)}]]),D="_error_l30mv_1",C=s(),$=o({name:"Auth",data:function(){return{loading:!1}},computed:{isExternal:function(){return this.$route.meta.isExternal&&!C.isStudent||!1},isNeedView:function(){return"login"===m.user.status||"/login"===this.$route.path||this.isExternal}},mounted:function(){!this.isExternal&&this.setAuth()},methods:{setAuth:function(){var e,t=this;return(e=regeneratorRuntime.mark((function e(){var n,o,i,a,c,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.$route.query,(o=n.userInfo||n.Authorization)&&f(o),!t.loading){e.next=5;break}return e.abrupt("return");case 5:if("init"!==m.user.status&&"error"!==m.user.status){e.next=19;break}return t.loading=!0,e.prev=7,e.next=10,p.get("/api-student/student/queryUserInfo",{initRequest:!0});case 10:i=e.sent,d(i.data),e.next=18;break;case 14:e.prev=14,e.t0=e.catch(7),-1===(a=e.t0.message).indexOf("403")&&-1===a.indexOf("authentication")?h():v();case 18:t.loading=!1;case 19:if("logout"===m.user.status)if(s().isApp)g({api:"login"});else try{c=t.$route,u=r({returnUrl:t.$route.path},t.$route.query),c.meta.isRegister&&(u.isRegister=c.meta.isRegister),t.$router.replace({path:"/login",query:u})}catch(l){}case 20:case"end":return e.stop()}}),e,null,[[7,14]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function c(e){i(a,r,o,c,u,"next",e)}function u(e){i(a,r,o,c,u,"throw",e)}c(void 0)}))})()}},render:function(){return y(x,null,["error"===m.user.status?y("div",{class:D},[y(b,{type:"notFond",classImgSize:"CERT",tips:"加载失败,请稍后重试",buttonText:"重新加载",plain:!0,onClick:this.setAuth},null)]):this.isNeedView?y(j,null,null):null])}}),q=[{path:"/share-music-sheet",name:"share-music-sheet",component:function(){return w((function(){return n.import("./index-legacy.e845840f.js")}),void 0)},meta:{title:"分享乐曲"}},{path:"/leaderboard",component:function(){return w((function(){return n.import("./index-legacy.0aa587fd.js")}),void 0)},meta:{title:"曲目挑战排行榜"}}],I=[{path:"/",component:$,children:[].concat(e(_),[{path:"/login",name:"login",component:function(){return w((function(){return n.import("./login-legacy.fbb9a187.js")}),void 0)},meta:{isRegister:!1}},{path:"/home",name:"home",component:function(){return w((function(){return n.import("./index-legacy.cbbc9fc7.js")}),void 0)}},{path:"/practiceClass",name:"practiceClass",component:function(){return w((function(){return n.import("./index-legacy.8c7f12fd.js")}),void 0)},meta:{title:"陪练课"}},{path:"/videoDetail",name:"videoDetail",component:function(){return w((function(){return n.import("./video-detail-legacy.fc4044b5.js")}),void 0)},meta:{title:"视频课"}},{path:"/videoClassDetail",name:"videoClassDetail",component:function(){return w((function(){return n.import("./video-class-detail-legacy.545ffda2.js")}),void 0)},meta:{title:"视频课详情"}},{path:"/liveDetail",name:"liveDetail",component:function(){return w((function(){return n.import("./live-detail-legacy.31146f2a.js")}),void 0)},meta:{title:"直播课详情"}},{path:"/memberRecord",name:"memberRecord",component:function(){return w((function(){return n.import("./member-record-legacy.8731ba98.js")}),void 0)},meta:{title:"训练统计"}},{path:"/tradeRecord",name:"tradeRecord",component:function(){return w((function(){return n.import("./index-legacy.fd0e142c.js")}),void 0)},meta:{title:"交易记录"}},{path:"/teacherHome",name:"teacherHome",component:function(){return w((function(){return n.import("./teacher-home-legacy.5c7df433.js")}),void 0)},meta:{title:"老师主页"}},{path:"/teacherElegant",name:"teacherElegant",component:function(){return w((function(){return n.import("./teacher-elegant-legacy.cfbe8be3.js")}),void 0)},meta:{title:"老师风采"}},{path:"/music-upload",component:function(){return w((function(){return n.import("./index-legacy.7d3ab71c.js")}),void 0)},meta:{title:"上传曲谱"}},{path:"/teacherFollow",component:function(){return w((function(){return n.import("./teacher-follow-legacy.5430f4e8.js")}),void 0)},meta:{title:"我的关注"}},{path:"/track-review-activity",component:function(){return w((function(){return n.import("./index-legacy.d6b3b71f.js")}),void 0)},meta:{title:"曲目评测活动",isExternal:!0}},{path:"/track-song",component:function(){return w((function(){return n.import("./track-song-legacy.c38da839.js")}),void 0)},meta:{title:"评测曲目"}}])}].concat(q,e(O),[{path:"/inviteTeacher",name:"inviteTeacher",component:function(){return w((function(){return n.import("./index-legacy.e13aba6e.js")}),void 0)},meta:{title:"邀请学员"}},{path:"/inviteSuccess",name:"inviteSuccess",component:function(){return w((function(){return n.import("./index-legacy.5997c3ff.js")}),void 0)},meta:{title:"注册成功"}},{path:"/transfer",component:function(){return w((function(){return n.import("./transfer-legacy.a8ae6381.js")}),void 0)},meta:{title:"酷乐秀学院"}},{path:"/download",component:function(){return w((function(){return n.import("./download-legacy.0f64a73d.js")}),void 0)}},{path:"/:pathMatch(.*)*",component:function(){return w((function(){return n.import("./index-legacy.61d3f88e.js")}),void 0)},meta:{title:"404 Not Fund",platform:"STUDENT"}}]),H=E({history:A(),routes:I});H.beforeEach((function(e,t,n){var r=e.meta.title;document.title=r||"酷乐秀",n()}));var N=!1;H.onError((function(e){if(e instanceof Error){var t=e.name.indexOf("chunk"),n=H.currentRoute.value.fullPath;t&&!N&&(N=!0,P.alert({title:"更新提示",message:"APP有更新请点击确定刷新页面?",confirmButtonColor:"var(--van-primary)"}).then((function(){s().isApp?g({api:"back"}):(location.hash=n,window.location.reload())})))}}));var U=R(k);g({api:"getVersion"},(function(e){m.version=e.content.version,console.log(e,"version")})),s().isTeacher?m.platformType="TEACHER":(s().isStudent,m.platformType="STUDENT"),"TEACHER"===m.platformType?m.platformApi="/api-teacher":m.platformApi="/api-student",T.locale("zh-ch"),U.config.globalProperties.$dayjs=T,U.config.globalProperties.$filters=S,U.use(H),U.mount("#app")}}}))}();