index-legacy.d2a6c11e.js 16 KB

1
  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,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 r(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function u(t){n(a,o,i,u,c,"next",t)}function c(t){n(a,o,i,u,c,"throw",t)}u(void 0)}))}}function o(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 i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var u=document.createElement("style");u.innerHTML="._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(["./ResizeObserver.es-legacy.44b91b4c.js","./auth-legacy.767687ba.js","./routes-common-legacy.1981f023.js"],(function(e,n){"use strict";var o,a,u,c,s,l,m,p,f,h,d,g,_,v,y,b,x,w,j,k,A,I,R,O,T,S,E,C,z,P,D,$,q,U;return{setters:[function(t){o=t.d,a=t._,u=t.r,c=t.c,s=t.o,l=t.e,m=t.T,p=t.s,f=t.a,h=t.b,d=t.f,g=t.g,_=t.h,v=t.p,y=t.i,b=t.j,x=t.C,w=t.R,j=t.F,k=t.k,A=t.l,I=t.m,R=t.D,O=t.n,T=t.q,S=t.t,E=t.u,C=t.v,z=t.w,P=t.x,D=t.y},function(t){$=t.A},function(t){q=t.r,U=t.a}],execute:function(){var B=o({name:"App"});var H,L=a(B,[["render",function(t,e,n,r,o,i){var a=u("router-view");return s(),c(a)}]]),G=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"}),N=(e("r",(function(){sessionStorage.removeItem("Authorization")})),e("s",(function(t){sessionStorage.setItem("Authorization",t)}))),F=e("a",l({timeout:2e4,timeoutMessage:"请求超时"})),M=!1;F.interceptors.request.use((function(t,e){e.hideLoading||(clearTimeout(H),m.loading({message:"加载中...",forbidClick:!0,loadingType:"spinner",duration:0})),M=e.initRequest||!1;var n=sessionStorage.getItem("Authorization")||"",r={};return n&&!["/api-auth/usernameLogin","/api-auth/smsLogin","/api-auth/code/sendSms"].includes(t)&&(r.Authorization=n),{url:t,options:i(i({},e),{},{params:p(e.params),headers:i(i({},e.headers),r)})}}),{global:!1}),F.interceptors.response.use(function(){var t=r(regeneratorRuntime.mark((function t(e){var n,r,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(H=setTimeout((function(){m.clear()}),100),!(e.status>299||e.status<200)){t.next=6;break}throw clearTimeout(H),n="服务器错误,状态码"+e.status,m(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||"处理失败,请重试",M&&(403===r.code||401===r.code?f():h()),403!==r.code&&401!==r.code&&(clearTimeout(H),m(o)),d(),403===r.code&&(o+="403",f(),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 V=d(),J=o({name:"Auth-loayout",data:function(){return{loading:!1}},computed:{isExternal:function(){return this.$route.meta.isExternal&&!V.isStudent||!1},isNeedView:function(){return"login"===g.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(),g.orchestraInfo.unionId||_()},methods:{setAuth:function(){var t=this;return r(regeneratorRuntime.mark((function e(){var n,r,o,a,u,c,s,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.$route.query,(r=n.userInfo||n.Authorization)&&N(r),!t.loading){e.next=5;break}return e.abrupt("return");case 5:if("init"!==g.user.status&&"error"!==g.user.status){e.next=26;break}if(t.loading=!0,e.prev=7,!g.orchestraInfo.unionId){e.next=15;break}return e.next=11,F.post("/api-auth/smsLogin",{requestType:"form",data:{clientId:"student",clientSecret:"student",phone:g.orchestraInfo.phone,token:g.orchestraInfo.token,isSurportRegister:!0}});case 11:o=e.sent,a=o.data.authentication,N(a.token_type+" "+a.access_token),v({api:"setCache",content:{key:"h5-colexiu-token",value:a.token_type+" "+a.access_token}});case 15:return e.next=17,F.get("/api-student/student/queryUserInfo",{initRequest:!0,requestType:"form"});case 17:u=e.sent,y(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():f();case 25:t.loading=!1;case 26:if("logout"===g.user.status)try{s=t.$route,l=i({returnUrl:t.$route.path},t.$route.query),s.meta.isRegister&&(l.isRegister=s.meta.isRegister),t.$router.replace({path:"/home-auth",query:l})}catch(m){}case 27:case"end":return e.stop()}}),e,null,[[7,21]])})))()}},render:function(){return b(j,null,["error"===g.user.status?b("div",{class:G.error},[b(x,{type:"notFond",classImgSize:"CERT",tips:"加载失败,请稍后重试",buttonText:"重新加载",plain:!0,onClick:this.setAuth},null)]):this.isNeedView?b(w,null,null):null])}}),K=[{path:"/share-music-sheet",name:"share-music-sheet",component:function(){return k((function(){return n.import("./index-legacy.e2b63520.js")}),void 0)},meta:{title:"分享乐曲"}},{path:"/leaderboard",component:function(){return k((function(){return n.import("./index-legacy.a081028f.js")}),void 0)},meta:{title:"曲目挑战排行榜"}}],Q=[{path:"/",component:$,children:[].concat(t(q),[{path:"/login",name:"login",component:function(){return k((function(){return n.import("./login-legacy.4439ad9e.js")}),void 0)},meta:{isRegister:!1}},{path:"/practiceClass",name:"practiceClass",component:function(){return k((function(){return n.import("./index-legacy.bd51969b.js")}),void 0)},meta:{title:"趣纠课"}},{path:"/videoDetail",name:"videoDetail",component:function(){return k((function(){return n.import("./video-detail-legacy.dd9359bf.js")}),void 0)},meta:{title:"视频课"}},{path:"/videoClassDetail",name:"videoClassDetail",component:function(){return k((function(){return n.import("./video-class-detail-legacy.09df4ff3.js")}),void 0)},meta:{title:"视频课详情"}},{path:"/liveDetail",name:"liveDetail",component:function(){return k((function(){return n.import("./live-detail-legacy.59a94674.js")}),void 0)},meta:{title:"直播课详情"}},{path:"/groupDetail",name:"groupDetail",component:function(){return k((function(){return n.import("./group-detail-legacy.0fb19ad3.js")}),void 0)},meta:{title:"小组课详情"}},{path:"/memberActive",name:"memberActive",component:function(){return k((function(){return n.import("./member-active-legacy.56e3ef71.js")}),void 0)},meta:{title:"小酷Ai会员大放价"}},{path:"/memberActiveO",name:"memberActiveO",component:function(){return k((function(){return n.import("./member-active-o-legacy.1f14f466.js")}),void 0)},meta:{title:"元旦狂想曲小酷送好礼"}},{path:"/memberRecord",name:"memberRecord",component:function(){return k((function(){return n.import("./member-record-legacy.7baffdae.js")}),void 0)},meta:{title:"练习统计"}},{path:"/tradeRecord",name:"tradeRecord",component:function(){return k((function(){return n.import("./index-legacy.b4024ce6.js")}),void 0)},meta:{title:"交易记录"}},{path:"/teacherHome",name:"teacherHome",component:function(){return k((function(){return n.import("./teacher-home-legacy.6452414d.js")}),void 0)},meta:{title:"老师主页"}},{path:"/teacherElegant",name:"teacherElegant",component:function(){return k((function(){return n.import("./teacher-elegant-legacy.b2aff5db.js")}),void 0)},meta:{title:"老师风采"}},{path:"/teacher-style",name:"teacher-style",component:function(){return k((function(){return n.import("./index-legacy.23ed9300.js")}),void 0)},meta:{title:"个人风采"}},{path:"/music-upload",component:function(){return k((function(){return n.import("./index-legacy.9a9f0204.js")}),void 0)},meta:{title:"上传曲谱"}},{path:"/teacherFollow",component:function(){return k((function(){return n.import("./teacher-follow-legacy.eb598570.js")}),void 0)},meta:{title:"我的关注"}},{path:"/track-review-activity",component:function(){return k((function(){return n.import("./index-legacy.176aded4.js")}),void 0)},meta:{title:"曲目评测活动",isExternal:!0}},{path:"/track-song",component:function(){return k((function(){return n.import("./track-song-legacy.4b0f477e.js")}),void 0)},meta:{title:"评测曲目"}},{path:"/discount-card",component:function(){return k((function(){return n.import("./index-legacy.a6a20b7c.js")}),void 0)},meta:{title:"畅学卡"}},{path:"/double12Active",component:function(){return k((function(){return n.import("./index-legacy.33e34ec1.js")}),void 0)},meta:{title:"双十二限时特惠"}}])},{path:"/home-layout",component:J,children:[{path:"/home-auth",name:"home-auth",component:function(){return k((function(){return n.import("./auth-login-legacy.54f20004.js")}),void 0)},meta:{title:"登录酷乐秀"}},{path:"/home-layout-center",name:"home-layout-center",component:function(){return k((function(){return n.import("./home-layout-center-legacy.05beffc1.js")}),void 0)},meta:{title:"登录酷乐秀"}},{path:"/home-login",name:"home-login",component:function(){return k((function(){return n.import("./login-legacy.bc35f563.js")}),void 0)},meta:{title:"登录酷乐秀"}},{path:"/home",name:"home",component:function(){return k((function(){return n.import("./index-legacy.6fda905d.js")}),void 0)}}]}].concat(K,t(U),[{path:"/inviteTeacher",name:"inviteTeacher",component:function(){return k((function(){return n.import("./index-legacy.f5dcf98e.js")}),void 0)},meta:{title:"邀请学员"}},{path:"/inviteSuccess",name:"inviteSuccess",component:function(){return k((function(){return n.import("./index-legacy.09b006cf.js")}),void 0)},meta:{title:"注册成功"}},{path:"/transfer",component:function(){return k((function(){return n.import("./transfer-legacy.fd0c0756.js")}),void 0)},meta:{title:"酷乐秀学院"}},{path:"/download",component:function(){return k((function(){return n.import("./download-legacy.603526f5.js")}),void 0)}},{path:"/:pathMatch(.*)*",component:function(){return k((function(){return n.import("./index-legacy.159bea24.js")}),void 0)},meta:{title:"404 Not Fund",platform:"STUDENT"}}]),W=A({history:I(),routes:Q,scrollBehavior:function(){return{left:0,top:0}}});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,R.alert({title:"更新提示",message:"APP有更新请点击确定刷新页面?",confirmButtonColor:"var(--van-primary)"}).then((function(){d().isApp?O({api:"back"}):(location.hash=n,window.location.reload())})))}})),void 0===window.ResizeObserver&&(window.ResizeObserver=T);var Y=S(L),Z=function(){var t=r(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return g.sourcType="kt",t.next=3,v({api:"getUserAccount"}).then(function(){var t=r(regeneratorRuntime.mark((function t(e){var n,r,o,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.content,console.log(n,"orchestra"),t.next=4,D.post("/api-auth/smsLogin",{requestType:"form",data:{clientId:"student",clientSecret:"student",phone:n.phone,isSurportRegister:!0,token:n.token.split(" ")[1]}});case 4:r=t.sent,o=r.data,i=o.authentication,E(i.token_type+" "+i.access_token);case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),tt=function(){var t=r(regeneratorRuntime.mark((function t(){var e,n,r,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(O({api:"setBarStatus",content:{status:0}}),O({api:"backIconChange",content:{backIconHide:!0}}),O({api:"getVersion"},(function(t){g.version=t.content.version})),d().isOrchestraStudent&&(v({api:"getUserAccount"}).then((function(t){var e=t.content;g.orchestraInfo.token=e.token.split(" ")[1],g.orchestraInfo.phone=e.phone,g.orchestraInfo.nickname=e.nickname,g.orchestraInfo.avatar=e.avatar,g.orchestraInfo.unionId=e.unionId||0})),v({api:"getCache",content:{key:"h5-colexiu-token"}}).then((function(t){var e=t.content;e.value&&E(e.value)}))),e=C.parse(location.search),n=C.parse(location.hash.split("?")[1]),r=e.source||n.source||"",o=e.Authorization||n.Authorization||"","kt"!==r){t.next=15;break}if(!o){t.next=13;break}g.sourcType="kt",t.next=15;break;case 13:return t.next=15,Z();case 15:d().isTeacher?g.platformType="TEACHER":(d().isStudent,g.platformType="STUDENT"),"TEACHER"===g.platformType?g.platformApi="/api-teacher":g.platformApi="/api-student",z.locale("zh-ch"),Y.config.globalProperties.$dayjs=z,Y.config.globalProperties.$filters=P,Y.use(W),Y.mount("#app");case 22:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();tt()}}}))}();