1 |
- !function(){function t(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(t,n)}(t)||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 e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function n(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function r(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){o(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(s){return void n(s)}u.done?e(c):Promise.resolve(c).then(r,o)}function a(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var a=t.apply(e,n);function u(t){i(a,r,o,u,c,"next",t)}function c(t){i(a,r,o,u,c,"throw",t)}u(void 0)}))}}var u=document.createElement("style");u.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%}._error_t671u_1{background-color:#fff;display:flex;flex-direction:column;min-height:100vh;align-items:center;justify-content:center}._error_t671u_1 ._info_t671u_9{display:flex;align-items:center;margin-bottom:.8rem}._error_t671u_1 ._info_t671u_9 span{display:inline-block;margin-left:.26667rem;color:#58727e;font-size:.48rem}._error_t671u_1 .col-result-container,._error_t671u_1 .van-empty{padding-top:0}._error_t671u_1 .van-button{width:50%}._login_t671u_27{min-height:100vh;background-color:#f6f6f6;background-size:100%;position:relative;overflow:hidden}._login_t671u_27 ._loginCenter_t671u_34{margin:0 auto;text-align:center}._login_t671u_27 ._userInfo_t671u_38{margin-top:1.92rem}._login_t671u_27 ._userInfo_t671u_38 ._img_t671u_41{width:2.77333rem;height:2.77333rem;border-radius:50%;overflow:hidden}._login_t671u_27 ._userInfo_t671u_38 ._name_t671u_47{padding-top:.32rem;font-size:.53333rem;font-weight:500;color:#333;line-height:.74667rem}._login_t671u_27 ._tips_t671u_54{padding-top:1.33333rem}._login_t671u_27 ._tips_t671u_54 ._logo_t671u_57{height:.74667rem}._login_t671u_27 ._tips_t671u_54 ._text_t671u_60{padding-top:.32rem;font-size:.37333rem;color:#777;line-height:.53333rem}._login_t671u_27 ._tips_t671u_54 ._phone_t671u_66{padding-top:.64rem;font-size:.53333rem;font-weight:500;color:#333;line-height:.74667rem}._login_t671u_27 ._btnGroup_t671u_73{position:absolute;bottom:1.86667rem;width:100%;text-align:center;display:flex;align-items:center;flex-direction:column}._login_t671u_27 ._btnGroup_t671u_73 ._btn_t671u_73{font-size:.42667rem;font-weight:500;width:5.44rem}._login_t671u_27 ._btnGroup_t671u_73 ._moreBtn_t671u_87{padding-top:.64rem;font-size:.42667rem;color:#333;line-height:.58667rem}\n",document.head.appendChild(u),System.register(["./index-legacy.b2528a15.js"],(function(e,n){"use strict";var o,i,u,c,s,l,m,p,f,d,h,_,g,v,y,b,x,w,j,k,A,I,E,R,O,T,S,C,$,z,P;return{setters:[function(t){o=t.d,i=t._,u=t.r,c=t.o,s=t.c,l=t.b,m=t.s,p=t.a,f=t.e,d=t.f,h=t.g,_=t.h,g=t.p,v=t.i,y=t.C,b=t.R,x=t.F,w=t.j,j=t.T,k=t.k,A=t.l,I=t.m,E=t.n,R=t.q,O=t.t,T=t.u,S=t.v,C=t.D,$=t.w,z=t.x,P=t.y}],execute:function(){var q=o({name:"App"});var D,U=i(q,[["render",function(t,e,n,r,o,i){var a=u("router-view");return c(),s(a)}]]),N="_error_l30mv_1",F=l(),G=o({name:"Auth",data:function(){return{loading:!1}},computed:{isExternal:function(){return this.$route.meta.isExternal&&!F.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 t=this;return a(regeneratorRuntime.mark((function e(){var n,o,i,a,u,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.$route.query,(o=n.userInfo||n.Authorization)&&p(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,f.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():_();case 18:t.loading=!1;case 19:if("logout"===m.user.status)if(l().isApp)g({api:"login"});else try{u=t.$route,c=r({returnUrl:t.$route.path},t.$route.query),u.meta.isRegister&&(c.isRegister=u.meta.isRegister),t.$router.replace({path:"/login",query:c})}catch(s){}case 20:case"end":return e.stop()}}),e,null,[[7,14]])})))()}},render:function(){return v(x,null,["error"===m.user.status?v("div",{class:N},[v(y,{type:"notFond",classImgSize:"CERT",tips:"加载失败,请稍后重试",buttonText:"重新加载",plain:!0,onClick:this.setAuth},null)]):this.isNeedView?v(b,null,null):null])}}),H=e("b",{error:"_error_t671u_1",info:"_info_t671u_9",login:"_login_t671u_27",loginCenter:"_loginCenter_t671u_34",userInfo:"_userInfo_t671u_38",img:"_img_t671u_41",name:"_name_t671u_47",tips:"_tips_t671u_54",logo:"_logo_t671u_57",text:"_text_t671u_60",phone:"_phone_t671u_66",btnGroup:"_btnGroup_t671u_73",btn:"_btn_t671u_73",moreBtn:"_moreBtn_t671u_87"}),L=(e("r",(function(){sessionStorage.removeItem("Authorization")})),e("s",(function(t){sessionStorage.setItem("Authorization",t)}))),V=e("a",w({timeout:2e4,timeoutMessage:"请求超时"})),B=!1;V.interceptors.request.use((function(t,e){e.hideLoading||(clearTimeout(D),j.loading({message:"加载中...",forbidClick:!0,loadingType:"spinner",duration:0})),B=e.initRequest||!1;var n=sessionStorage.getItem("Authorization")||"",o={};return n&&!["/api-auth/usernameLogin","/api-auth/smsLogin","/api-auth/code/sendSms"].includes(t)&&(o.Authorization=n),{url:t,options:r(r({},e),{},{params:k(e.params),headers:r(r({},e.headers),o)})}}),{global:!1}),V.interceptors.response.use(function(){var t=a(regeneratorRuntime.mark((function t(e){var n,r,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(D=setTimeout((function(){j.clear()}),100),!(e.status>299||e.status<200)){t.next=6;break}throw clearTimeout(D),n="服务器错误,状态码"+e.status,j(n),new Error(n);case 6:return t.next=8,e.clone().json();case 8:if(200===(r=t.sent).code||0===r.errCode){t.next=16;break}throw o=r.msg||r.message||"处理失败,请重试",B&&(403===r.code||401===r.code?_():h()),403!==r.code&&401!==r.code&&(clearTimeout(D),j(o)),l(),403===r.code&&(o+="403",_(),window.location.href=window.location.origin+window.location.pathname+"#/home-layout-center"),new Error(o);case 16:return t.abrupt("return",e);case 17:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),{global:!1});var M=l(),J=o({name:"Auth-loayout",data:function(){return{loading:!1}},computed:{isExternal:function(){return this.$route.meta.isExternal&&!M.isStudent||!1},isNeedView:function(){return"login"===m.user.status||"/home-auth"===this.$route.path||"/home-login"===this.$route.path||"/home-layout-center"===this.$route.path||this.isExternal}},mounted:function(){!this.isExternal&&this.setAuth(),m.orchestraInfo.unionId||A()},methods:{setAuth:function(){var t=this;return a(regeneratorRuntime.mark((function e(){var n,o,i,a,u,c,s,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.$route.query,(o=n.userInfo||n.Authorization)&&L(o),!t.loading){e.next=5;break}return e.abrupt("return");case 5:if("init"!==m.user.status&&"error"!==m.user.status){e.next=26;break}if(t.loading=!0,e.prev=7,!m.orchestraInfo.unionId){e.next=15;break}return e.next=11,V.post("/api-auth/smsLogin",{requestType:"form",data:{clientId:"student",clientSecret:"student",phone:m.orchestraInfo.phone,token:m.orchestraInfo.token,isSurportRegister:!0}});case 11:i=e.sent,a=i.data.authentication,L(a.token_type+" "+a.access_token),I({api:"setCache",content:{key:"h5-colexiu-token",value:a.token_type+" "+a.access_token}});case 15:return e.next=17,V.get("/api-student/student/queryUserInfo",{initRequest:!0,requestType:"form"});case 17:u=e.sent,d(u.data),e.next=25;break;case 21:e.prev=21,e.t0=e.catch(7),-1===(c=e.t0.message).indexOf("5000")&&-1===c.indexOf("authentication")?h():_();case 25:t.loading=!1;case 26:if("logout"===m.user.status)try{s=t.$route,l=r({returnUrl:t.$route.path},t.$route.query),s.meta.isRegister&&(l.isRegister=s.meta.isRegister),t.$router.replace({path:"/home-auth",query:l})}catch(p){}case 27:case"end":return e.stop()}}),e,null,[[7,21]])})))()}},render:function(){return v(x,null,["error"===m.user.status?v("div",{class:H.error},[v(y,{type:"notFond",classImgSize:"CERT",tips:"加载失败,请稍后重试",buttonText:"重新加载",plain:!0,onClick:this.setAuth},null)]):this.isNeedView?v(b,null,null):null])}}),K=[{path:"/share-music-sheet",name:"share-music-sheet",component:function(){return R((function(){return n.import("./index-legacy.3337086b.js")}),void 0)},meta:{title:"分享乐曲"}},{path:"/leaderboard",component:function(){return R((function(){return n.import("./index-legacy.04ef6944.js")}),void 0)},meta:{title:"曲目挑战排行榜"}}],Q=[{path:"/",component:G,children:[].concat(t(E),[{path:"/login",name:"login",component:function(){return R((function(){return n.import("./login-legacy.15fce1fe.js")}),void 0)},meta:{isRegister:!1}},{path:"/practiceClass",name:"practiceClass",component:function(){return R((function(){return n.import("./index-legacy.9bef8303.js")}),void 0)},meta:{title:"陪练课"}},{path:"/videoDetail",name:"videoDetail",component:function(){return R((function(){return n.import("./video-detail-legacy.be069da5.js")}),void 0)},meta:{title:"视频课"}},{path:"/videoClassDetail",name:"videoClassDetail",component:function(){return R((function(){return n.import("./video-class-detail-legacy.a491a78b.js")}),void 0)},meta:{title:"视频课详情"}},{path:"/liveDetail",name:"liveDetail",component:function(){return R((function(){return n.import("./live-detail-legacy.6d41773e.js")}),void 0)},meta:{title:"直播课详情"}},{path:"/memberActive",name:"memberActive",component:function(){return R((function(){return n.import("./member-active-legacy.cd9b8f31.js")}),void 0)},meta:{title:"小酷Ai会员大放价"}},{path:"/memberRecord",name:"memberRecord",component:function(){return R((function(){return n.import("./member-record-legacy.a77d1203.js")}),void 0)},meta:{title:"训练统计"}},{path:"/tradeRecord",name:"tradeRecord",component:function(){return R((function(){return n.import("./index-legacy.b10ad14c.js")}),void 0)},meta:{title:"交易记录"}},{path:"/teacherHome",name:"teacherHome",component:function(){return R((function(){return n.import("./teacher-home-legacy.fff2b839.js")}),void 0)},meta:{title:"老师主页"}},{path:"/teacherElegant",name:"teacherElegant",component:function(){return R((function(){return n.import("./teacher-elegant-legacy.b40e8347.js")}),void 0)},meta:{title:"老师风采"}},{path:"/music-upload",component:function(){return R((function(){return n.import("./index-legacy.aa21f323.js")}),void 0)},meta:{title:"上传曲谱"}},{path:"/teacherFollow",component:function(){return R((function(){return n.import("./teacher-follow-legacy.7089cca6.js")}),void 0)},meta:{title:"我的关注"}},{path:"/track-review-activity",component:function(){return R((function(){return n.import("./index-legacy.5616d2be.js")}),void 0)},meta:{title:"曲目评测活动",isExternal:!0}},{path:"/track-song",component:function(){return R((function(){return n.import("./track-song-legacy.512325bb.js")}),void 0)},meta:{title:"评测曲目"}}])},{path:"/home-layout",component:J,children:[{path:"/home-auth",name:"home-auth",component:function(){return R((function(){return n.import("./auth-login-legacy.45ce21dc.js")}),void 0)},meta:{title:"登录酷乐秀"}},{path:"/home-layout-center",name:"home-layout-center",component:function(){return R((function(){return n.import("./home-layout-center-legacy.f62118e6.js")}),void 0)},meta:{title:"登录酷乐秀"}},{path:"/home-login",name:"home-login",component:function(){return R((function(){return n.import("./login-legacy.4516de6a.js")}),void 0)},meta:{title:"登录酷乐秀"}},{path:"/home",name:"home",component:function(){return R((function(){return n.import("./index-legacy.8a9690cb.js")}),void 0)}}]}].concat(K,t(O),[{path:"/inviteTeacher",name:"inviteTeacher",component:function(){return R((function(){return n.import("./index-legacy.dbc484ef.js")}),void 0)},meta:{title:"邀请学员"}},{path:"/inviteSuccess",name:"inviteSuccess",component:function(){return R((function(){return n.import("./index-legacy.3ebda78c.js")}),void 0)},meta:{title:"注册成功"}},{path:"/transfer",component:function(){return R((function(){return n.import("./transfer-legacy.7b264913.js")}),void 0)},meta:{title:"酷乐秀学院"}},{path:"/download",component:function(){return R((function(){return n.import("./download-legacy.07d8d932.js")}),void 0)}},{path:"/:pathMatch(.*)*",component:function(){return R((function(){return n.import("./index-legacy.b2f66747.js")}),void 0)},meta:{title:"404 Not Fund",platform:"STUDENT"}}]),W=T({history:S(),routes:Q});W.beforeEach((function(t,e,n){var r=t.meta.title;document.title=r||"酷乐秀",n()}));var X=!1;W.onError((function(t){if(t instanceof Error){var e=t.name.indexOf("chunk"),n=W.currentRoute.value.fullPath;e&&!X&&(X=!0,C.alert({title:"更新提示",message:"APP有更新请点击确定刷新页面?",confirmButtonColor:"var(--van-primary)"}).then((function(){l().isApp?g({api:"back"}):(location.hash=n,window.location.reload())})))}}));var Y=$(U);g({api:"getVersion"},(function(t){m.version=t.content.version})),l().isOrchestraStudent&&(I({api:"getUserAccount"}).then((function(t){var e=t.content;m.orchestraInfo.token=e.token.split(" ")[1],m.orchestraInfo.phone=e.phone,m.orchestraInfo.nickname=e.nickname,m.orchestraInfo.avatar=e.avatar,m.orchestraInfo.unionId=e.unionId||0})),I({api:"getCache",content:{key:"h5-colexiu-token"}}).then((function(t){var e=t.content;e.value&&p(e.value)}))),l().isTeacher?m.platformType="TEACHER":(l().isStudent,m.platformType="STUDENT"),"TEACHER"===m.platformType?m.platformApi="/api-teacher":m.platformApi="/api-student",z.locale("zh-ch"),Y.config.globalProperties.$dayjs=z,Y.config.globalProperties.$filters=P,Y.use(W),Y.mount("#app")}}}))}();
|