index-legacy.5472611e.js 15 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,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(s){return void n(s)}u.done?t(c):Promise.resolve(c).then(r,o)}function r(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var a=e.apply(t,r);function u(e){n(a,o,i,u,c,"next",e)}function c(e){n(a,o,i,u,c,"throw",e)}u(void 0)}))}}function o(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 i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}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.8d60aee1.js","./auth-legacy.f1aaf922.js","./routes-common-legacy.8df12de3.js"],(function(t,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(e){o=e.d,a=e._,u=e.r,c=e.c,s=e.o,l=e.e,m=e.T,p=e.s,f=e.a,h=e.b,d=e.f,g=e.g,_=e.h,v=e.p,y=e.i,b=e.j,x=e.C,w=e.R,j=e.F,k=e.k,A=e.l,I=e.m,R=e.D,O=e.n,T=e.q,S=e.t,E=e.u,C=e.v,z=e.w,P=e.x,D=e.y},function(e){$=e.A},function(e){q=e.r,U=e.a}],execute:function(){var B=o({name:"App"});var H,L=a(B,[["render",function(e,t,n,r,o,i){var a=u("router-view");return s(),c(a)}]]),G=t("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=(t("r",(function(){sessionStorage.removeItem("Authorization")})),t("s",(function(e){sessionStorage.setItem("Authorization",e)}))),F=t("a",l({timeout:2e4,timeoutMessage:"请求超时"})),M=!1;F.interceptors.request.use((function(e,t){t.hideLoading||(clearTimeout(H),m.loading({message:"加载中...",forbidClick:!0,loadingType:"spinner",duration:0})),M=t.initRequest||!1;var n=sessionStorage.getItem("Authorization")||"",r={};return n&&!["/api-auth/usernameLogin","/api-auth/smsLogin","/api-auth/code/sendSms"].includes(e)&&(r.Authorization=n),{url:e,options:i(i({},t),{},{params:p(t.params),headers:i(i({},t.headers),r)})}}),{global:!1}),F.interceptors.response.use(function(){var e=r(regeneratorRuntime.mark((function e(t){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(H=setTimeout((function(){m.clear()}),100),!(t.status>299||t.status<200)){e.next=6;break}throw clearTimeout(H),n="服务器错误,状态码"+t.status,m(n),new Error(n);case 6:return e.next=8,t.clone().json();case 8:if(200===(r=e.sent).code||0===r.errCode){e.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 e.abrupt("return",t);case 17:case"end":return e.stop()}}),e)})));return function(t){return e.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 e=this;return r(regeneratorRuntime.mark((function t(){var n,r,o,a,u,c,s,l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.$route.query,(r=n.userInfo||n.Authorization)&&N(r),!e.loading){t.next=5;break}return t.abrupt("return");case 5:if("init"!==g.user.status&&"error"!==g.user.status){t.next=26;break}if(e.loading=!0,t.prev=7,!g.orchestraInfo.unionId){t.next=15;break}return t.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=t.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 t.next=17,F.get("/api-student/student/queryUserInfo",{initRequest:!0,requestType:"form"});case 17:u=t.sent,y(u.data),t.next=25;break;case 21:t.prev=21,t.t0=t.catch(7),-1===(c=t.t0.message).indexOf("5000")&&-1===c.indexOf("authentication")?h():f();case 25:e.loading=!1;case 26:if("logout"===g.user.status)try{s=e.$route,l=i({returnUrl:e.$route.path},e.$route.query),s.meta.isRegister&&(l.isRegister=s.meta.isRegister),e.$router.replace({path:"/home-auth",query:l})}catch(m){}case 27:case"end":return t.stop()}}),t,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.6ee62cd9.js")}),void 0)},meta:{title:"分享乐曲"}},{path:"/leaderboard",component:function(){return k((function(){return n.import("./index-legacy.0eb03e08.js")}),void 0)},meta:{title:"曲目挑战排行榜"}}],Q=[{path:"/",component:$,children:[].concat(e(q),[{path:"/login",name:"login",component:function(){return k((function(){return n.import("./login-legacy.b3b30c1f.js")}),void 0)},meta:{isRegister:!1}},{path:"/practiceClass",name:"practiceClass",component:function(){return k((function(){return n.import("./index-legacy.2979974f.js")}),void 0)},meta:{title:"趣纠课"}},{path:"/videoDetail",name:"videoDetail",component:function(){return k((function(){return n.import("./video-detail-legacy.ebf7b22c.js")}),void 0)},meta:{title:"视频课"}},{path:"/videoClassDetail",name:"videoClassDetail",component:function(){return k((function(){return n.import("./video-class-detail-legacy.0ca57f7e.js")}),void 0)},meta:{title:"视频课详情"}},{path:"/liveDetail",name:"liveDetail",component:function(){return k((function(){return n.import("./live-detail-legacy.03e992db.js")}),void 0)},meta:{title:"直播课详情"}},{path:"/memberActive",name:"memberActive",component:function(){return k((function(){return n.import("./member-active-legacy.46f4035a.js")}),void 0)},meta:{title:"小酷Ai会员大放价"}},{path:"/memberActiveO",name:"memberActiveO",component:function(){return k((function(){return n.import("./member-active-o-legacy.5bb2a965.js")}),void 0)},meta:{title:"元旦狂想曲小酷送好礼"}},{path:"/memberRecord",name:"memberRecord",component:function(){return k((function(){return n.import("./member-record-legacy.91bd01a6.js")}),void 0)},meta:{title:"练习统计"}},{path:"/tradeRecord",name:"tradeRecord",component:function(){return k((function(){return n.import("./index-legacy.e8e683bc.js")}),void 0)},meta:{title:"交易记录"}},{path:"/teacherHome",name:"teacherHome",component:function(){return k((function(){return n.import("./teacher-home-legacy.f68cea07.js")}),void 0)},meta:{title:"老师主页"}},{path:"/teacherElegant",name:"teacherElegant",component:function(){return k((function(){return n.import("./teacher-elegant-legacy.0bf11d79.js")}),void 0)},meta:{title:"老师风采"}},{path:"/teacher-style",name:"teacher-style",component:function(){return k((function(){return n.import("./index-legacy.fffc2661.js")}),void 0)},meta:{title:"个人风采"}},{path:"/music-upload",component:function(){return k((function(){return n.import("./index-legacy.ef413376.js")}),void 0)},meta:{title:"上传曲谱"}},{path:"/teacherFollow",component:function(){return k((function(){return n.import("./teacher-follow-legacy.d37e303f.js")}),void 0)},meta:{title:"我的关注"}},{path:"/track-review-activity",component:function(){return k((function(){return n.import("./index-legacy.77d97a46.js")}),void 0)},meta:{title:"曲目评测活动",isExternal:!0}},{path:"/track-song",component:function(){return k((function(){return n.import("./track-song-legacy.db28ae7e.js")}),void 0)},meta:{title:"评测曲目"}},{path:"/discount-card",component:function(){return k((function(){return n.import("./index-legacy.551edd5f.js")}),void 0)},meta:{title:"畅学卡"}},{path:"/double12Active",component:function(){return k((function(){return n.import("./index-legacy.1b4326d5.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.38ae1250.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.8213dfe2.js")}),void 0)},meta:{title:"登录酷乐秀"}},{path:"/home-login",name:"home-login",component:function(){return k((function(){return n.import("./login-legacy.111a0c0a.js")}),void 0)},meta:{title:"登录酷乐秀"}},{path:"/home",name:"home",component:function(){return k((function(){return n.import("./index-legacy.5a12e33d.js")}),void 0)}}]}].concat(K,e(U),[{path:"/inviteTeacher",name:"inviteTeacher",component:function(){return k((function(){return n.import("./index-legacy.a332a363.js")}),void 0)},meta:{title:"邀请学员"}},{path:"/inviteSuccess",name:"inviteSuccess",component:function(){return k((function(){return n.import("./index-legacy.5851419d.js")}),void 0)},meta:{title:"注册成功"}},{path:"/transfer",component:function(){return k((function(){return n.import("./transfer-legacy.e2d6d566.js")}),void 0)},meta:{title:"酷乐秀学院"}},{path:"/download",component:function(){return k((function(){return n.import("./download-legacy.f8a955bc.js")}),void 0)}},{path:"/:pathMatch(.*)*",component:function(){return k((function(){return n.import("./index-legacy.5a5acb4f.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(e,t,n){var r=e.meta.title;document.title=r||"酷乐秀",n()}));var X=!1;W.onError((function(e){if(e instanceof Error){var t=e.name.indexOf("chunk"),n=W.currentRoute.value.fullPath;t&&!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 e=r(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return g.sourcType="kt",e.next=3,v({api:"getUserAccount"}).then(function(){var e=r(regeneratorRuntime.mark((function e(t){var n,r,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.content,console.log(n,"orchestra"),e.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=e.sent,o=r.data,i=o.authentication,E(i.token_type+" "+i.access_token);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ee=function(){var e=r(regeneratorRuntime.mark((function e(){var t,n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(O({api:"setBarStatus",content:{status:0}}),O({api:"backIconChange",content:{backIconHide:!0}}),O({api:"getVersion"},(function(e){g.version=e.content.version})),d().isOrchestraStudent&&(v({api:"getUserAccount"}).then((function(e){var t=e.content;g.orchestraInfo.token=t.token.split(" ")[1],g.orchestraInfo.phone=t.phone,g.orchestraInfo.nickname=t.nickname,g.orchestraInfo.avatar=t.avatar,g.orchestraInfo.unionId=t.unionId||0})),v({api:"getCache",content:{key:"h5-colexiu-token"}}).then((function(e){var t=e.content;t.value&&E(t.value)}))),t=C.parse(location.search),n=C.parse(location.hash.split("?")[1]),r=t.source||n.source||"",o=t.Authorization||n.Authorization||"","kt"!==r){e.next=15;break}if(!o){e.next=13;break}g.sourcType="kt",e.next=15;break;case 13:return e.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 e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();ee()}}}))}();