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(["./index-legacy.b903c881.js","./auth-legacy.142e2d3d.js","./routes-common-legacy.ea497c09.js"],(function(e,n){"use strict";var o,a,u,c,s,l,m,p,f,d,h,_,g,v,y,b,j,w,x,k,A,I,O,T,E,S,C,R,P,z,D;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,d=t.b,h=t.f,_=t.g,g=t.h,v=t.p,y=t.i,b=t.j,j=t.C,w=t.R,x=t.F,k=t.k,A=t.l,I=t.m,O=t.D,T=t.n,E=t.q,S=t.t,C=t.u,R=t.v},function(t){P=t.A},function(t){z=t.r,D=t.a}],execute:function(){var $=o({name:"App"});var q,H=a($,[["render",function(t,e,n,r,o,i){var a=u("router-view");return s(),c(a)}]]),U=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"}),B=(e("r",(function(){sessionStorage.removeItem("Authorization")})),e("s",(function(t){sessionStorage.setItem("Authorization",t)}))),G=e("a",l({timeout:2e4,timeoutMessage:"请求超时"})),L=!1;G.interceptors.request.use((function(t,e){e.hideLoading||(clearTimeout(q),m.loading({message:"加载中...",forbidClick:!0,loadingType:"spinner",duration:0})),L=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}),G.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(q=setTimeout((function(){m.clear()}),100),!(e.status>299||e.status<200)){t.next=6;break}throw clearTimeout(q),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||"处理失败,请重试",L&&(403===r.code||401===r.code?f():d()),403!==r.code&&401!==r.code&&(clearTimeout(q),m(o)),h(),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 N=h(),F=o({name:"Auth-loayout",data:function(){return{loading:!1}},computed:{isExternal:function(){return this.$route.meta.isExternal&&!N.isStudent||!1},isNeedView:function(){return"login"===_.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(),_.orchestraInfo.unionId||g()},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)&&B(r),!t.loading){e.next=5;break}return e.abrupt("return");case 5:if("init"!==_.user.status&&"error"!==_.user.status){e.next=26;break}if(t.loading=!0,e.prev=7,!_.orchestraInfo.unionId){e.next=15;break}return e.next=11,G.post("/api-auth/smsLogin",{requestType:"form",data:{clientId:"student",clientSecret:"student",phone:_.orchestraInfo.phone,token:_.orchestraInfo.token,isSurportRegister:!0}});case 11:o=e.sent,a=o.data.authentication,B(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,G.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")?d():f();case 25:t.loading=!1;case 26:if("logout"===_.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(x,null,["error"===_.user.status?b("div",{class:U.error},[b(j,{type:"notFond",classImgSize:"CERT",tips:"加载失败,请稍后重试",buttonText:"重新加载",plain:!0,onClick:this.setAuth},null)]):this.isNeedView?b(w,null,null):null])}}),M=[{path:"/share-music-sheet",name:"share-music-sheet",component:function(){return k((function(){return n.import("./index-legacy.d18ce982.js")}),void 0)},meta:{title:"分享乐曲"}},{path:"/leaderboard",component:function(){return k((function(){return n.import("./index-legacy.d91cef2a.js")}),void 0)},meta:{title:"曲目挑战排行榜"}}],V=[{path:"/",component:P,children:[].concat(t(z),[{path:"/login",name:"login",component:function(){return k((function(){return n.import("./login-legacy.3773c912.js")}),void 0)},meta:{isRegister:!1}},{path:"/practiceClass",name:"practiceClass",component:function(){return k((function(){return n.import("./index-legacy.84f911e0.js")}),void 0)},meta:{title:"陪练课"}},{path:"/videoDetail",name:"videoDetail",component:function(){return k((function(){return n.import("./video-detail-legacy.22779a2a.js")}),void 0)},meta:{title:"视频课"}},{path:"/videoClassDetail",name:"videoClassDetail",component:function(){return k((function(){return n.import("./video-class-detail-legacy.b93ffaa8.js")}),void 0)},meta:{title:"视频课详情"}},{path:"/liveDetail",name:"liveDetail",component:function(){return k((function(){return n.import("./live-detail-legacy.b4ae9c41.js")}),void 0)},meta:{title:"直播课详情"}},{path:"/memberActive",name:"memberActive",component:function(){return k((function(){return n.import("./member-active-legacy.cdaea888.js")}),void 0)},meta:{title:"小酷Ai会员大放价"}},{path:"/memberActiveO",name:"memberActiveO",component:function(){return k((function(){return n.import("./member-active-o-legacy.1827787d.js")}),void 0)},meta:{title:"元旦狂想曲小酷送好礼"}},{path:"/memberRecord",name:"memberRecord",component:function(){return k((function(){return n.import("./member-record-legacy.31e88e6e.js")}),void 0)},meta:{title:"训练统计"}},{path:"/tradeRecord",name:"tradeRecord",component:function(){return k((function(){return n.import("./index-legacy.5666918e.js")}),void 0)},meta:{title:"交易记录"}},{path:"/teacherHome",name:"teacherHome",component:function(){return k((function(){return n.import("./teacher-home-legacy.6c5d419a.js")}),void 0)},meta:{title:"老师主页"}},{path:"/teacherElegant",name:"teacherElegant",component:function(){return k((function(){return n.import("./teacher-elegant-legacy.6429ab78.js")}),void 0)},meta:{title:"老师风采"}},{path:"/music-upload",component:function(){return k((function(){return n.import("./index-legacy.66b8243f.js")}),void 0)},meta:{title:"上传曲谱"}},{path:"/teacherFollow",component:function(){return k((function(){return n.import("./teacher-follow-legacy.6c93a7d9.js")}),void 0)},meta:{title:"我的关注"}},{path:"/track-review-activity",component:function(){return k((function(){return n.import("./index-legacy.e44203ed.js")}),void 0)},meta:{title:"曲目评测活动",isExternal:!0}},{path:"/track-song",component:function(){return k((function(){return n.import("./track-song-legacy.7755c57c.js")}),void 0)},meta:{title:"评测曲目"}}])},{path:"/home-layout",component:F,children:[{path:"/home-auth",name:"home-auth",component:function(){return k((function(){return n.import("./auth-login-legacy.661f6d3d.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.219d98d1.js")}),void 0)},meta:{title:"登录酷乐秀"}},{path:"/home-login",name:"home-login",component:function(){return k((function(){return n.import("./login-legacy.61de3b99.js")}),void 0)},meta:{title:"登录酷乐秀"}},{path:"/home",name:"home",component:function(){return k((function(){return n.import("./index-legacy.3c44627c.js")}),void 0)}}]}].concat(M,t(D),[{path:"/inviteTeacher",name:"inviteTeacher",component:function(){return k((function(){return n.import("./index-legacy.38cae358.js")}),void 0)},meta:{title:"邀请学员"}},{path:"/inviteSuccess",name:"inviteSuccess",component:function(){return k((function(){return n.import("./index-legacy.98e3030a.js")}),void 0)},meta:{title:"注册成功"}},{path:"/transfer",component:function(){return k((function(){return n.import("./transfer-legacy.357bbd2b.js")}),void 0)},meta:{title:"酷乐秀学院"}},{path:"/download",component:function(){return k((function(){return n.import("./download-legacy.a68b4aaf.js")}),void 0)}},{path:"/:pathMatch(.*)*",component:function(){return k((function(){return n.import("./index-legacy.4bf841d6.js")}),void 0)},meta:{title:"404 Not Fund",platform:"STUDENT"}}]),J=A({history:I(),routes:V});J.beforeEach((function(t,e,n){var r=t.meta.title;document.title=r||"酷乐秀",n()}));var K=!1;J.onError((function(t){if(t instanceof Error){var e=t.name.indexOf("chunk"),n=J.currentRoute.value.fullPath;e&&!K&&(K=!0,O.alert({title:"更新提示",message:"APP有更新请点击确定刷新页面?",confirmButtonColor:"var(--van-primary)"}).then((function(){h().isApp?T({api:"back"}):(location.hash=n,window.location.reload())})))}}));var Q=E(H);T({api:"setBarStatus",content:{status:0}}),T({api:"backIconChange",content:{backIconHide:!0}}),T({api:"getVersion"},(function(t){_.version=t.content.version})),h().isOrchestraStudent&&(v({api:"getUserAccount"}).then((function(t){var e=t.content;_.orchestraInfo.token=e.token.split(" ")[1],_.orchestraInfo.phone=e.phone,_.orchestraInfo.nickname=e.nickname,_.orchestraInfo.avatar=e.avatar,_.orchestraInfo.unionId=e.unionId||0})),v({api:"getCache",content:{key:"h5-colexiu-token"}}).then((function(t){var e=t.content;e.value&&S(e.value)}))),h().isTeacher?_.platformType="TEACHER":(h().isStudent,_.platformType="STUDENT"),"TEACHER"===_.platformType?_.platformApi="/api-teacher":_.platformApi="/api-student",C.locale("zh-ch"),Q.config.globalProperties.$dayjs=C,Q.config.globalProperties.$filters=R,Q.use(J),Q.mount("#app")}}}))}();
|