1 |
- !function(){function e(e,t,n,r,a,i,c){try{var l=e[i](c),s=l.value}catch(o){return void n(o)}l.done?t(s):Promise.resolve(s).then(r,a)}function t(t){return function(){var n=this,r=arguments;return new Promise((function(a,i){var c=t.apply(n,r);function l(t){e(c,a,i,l,s,"next",t)}function s(t){e(c,a,i,l,s,"throw",t)}l(void 0)}))}}var n=document.createElement("style");n.innerHTML="._headImg_1lc9z_1{display:flex}._tabs_1lc9z_4{margin-top:-1.12rem}._tabs_1lc9z_4 .van-tabs__wrap{height:1.12rem}._tabs_1lc9z_4 .van-tabs__nav{background:rgba(0,0,0,.68)!important;backdrop-filter:blur(.48rem);-webkit-backdrop-filter:blur(.48rem)}._tabs_1lc9z_4 .van-tabs__line{background-color:transparent!important;height:0;width:0;border:.21333rem solid transparent;border-bottom-color:#fff;border-radius:0}._tabs_1lc9z_4 .van-empty__image{width:2.66667rem;height:3.04rem}._tabContent_1lc9z_27{position:relative;padding:.32rem .58667rem .32rem .32rem;box-sizing:border-box;overflow-y:auto;width:calc(100vw + .26667rem)}._tabContent_1lc9z_27._hasUser_1lc9z_35{padding-bottom:2.13333rem}._itemContent_1lc9z_38{padding:.32rem;border-radius:.32rem;background-color:#fff;min-height:100%;box-sizing:border-box}._item_1lc9z_38{display:flex;padding:.26667rem 0;box-sizing:border-box;align-items:center}._item_1lc9z_38 ._left_1lc9z_51{width:.85333rem;margin:0 .56rem 0 .05333rem;text-align:center;font-weight:700}._item_1lc9z_38 ._center_1lc9z_57{display:flex;align-items:center}._item_1lc9z_38 ._right_1lc9z_61{margin-left:auto;text-align:right}._item_1lc9z_38 ._right_1lc9z_61 ._fraction_1lc9z_65{font-size:.37333rem;font-weight:600;color:#fa6400;margin-bottom:.10667rem}._item_1lc9z_38 ._right_1lc9z_61 ._time_1lc9z_71{font-size:.32rem;color:#999}._item_1lc9z_38:first-child{padding-top:0;border-bottom:.02667rem solid #eee}._item_1lc9z_38:last-child{padding-bottom:0}._item_1lc9z_38 ._user_1lc9z_82{margin-left:.16rem}._item_1lc9z_38 ._user_1lc9z_82 ._userContent_1lc9z_85{display:flex;align-items:center;margin-bottom:.10667rem}._item_1lc9z_38 ._user_1lc9z_82 ._name_1lc9z_90{font-size:.4rem;color:#333;margin-right:.16rem;max-width:2rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._item_1lc9z_38 ._user_1lc9z_82 ._tag_1lc9z_99{font-size:.32rem;background-color:#ffe2b2;color:#ff8c00;border-radius:.10667rem;margin-right:.10667rem;padding:.02667rem .05333rem}._item_1lc9z_38 ._user_1lc9z_82 ._times_1lc9z_107{font-size:.32rem;color:#999}._activeUser_1lc9z_111{--van-cell-line-height: .53333rem;position:absolute;left:0;bottom:0;width:100%;box-sizing:border-box;box-shadow:0 -.21333rem .32rem #ebedf0;background-color:#fff}._activeUser_1lc9z_111 .van-cell__title{font-weight:700}._activeUser_1lc9z_111 .van-cell__label{font-weight:400}._activeUser_1lc9z_111 .van-cell__value{flex:initial;margin-left:.21333rem}._activeUser_1lc9z_111 ._avator_1lc9z_131{width:1.28rem;height:1.28rem;margin-right:.32rem}._activeUser_1lc9z_111 ._btn_1lc9z_136{padding:.10667rem .26667rem;border:none;background:linear-gradient(180deg,#ffa200 0%,#ff6900 100%);border-radius:.42667rem}._activeUser_1lc9z_111 ._num_1lc9z_142{font-size:.37333rem;font-weight:700;color:#fa6400}\n",document.head.appendChild(n),System.register(["./index-legacy.fba2875c.js","./index-legacy.7dcec7b3.js","./index-legacy.d92f7da7.js","./index-legacy.edb65d0c.js","./index-legacy.af00a324.js","./index-legacy.5aeab789.js","./icon_level3-legacy.16a3757a.js","./icon_teacher-legacy.42ba77b1.js","./use-id-legacy.db87b112.js","./use-tab-status-legacy.8752ccde.js","./use-refs-legacy.2affcb61.js"],(function(e){"use strict";var n,r,a,i,c,l,s,o,u,_,d,m,f,v,g,b,h,p,z,x,y,k,w;return{setters:[function(e){n=e.d,r=e.O,a=e.P,i=e.Q,c=e.S,l=e.U,s=e.V,o=e.g,u=e.j,_=e.W,d=e.X,m=e.z,f=e.Y,v=e.Z,g=e.w},function(e){b=e.C},function(e){h=e.I},function(){},function(){},function(e){p=e.T,z=e.a},function(e){x=e.I,y=e.a,k=e.b},function(e){w=e.i},function(){},function(){},function(){}],execute:function(){var I={headImg:"_headImg_1lc9z_1",tabs:"_tabs_1lc9z_4",tabContent:"_tabContent_1lc9z_27",hasUser:"_hasUser_1lc9z_35",itemContent:"_itemContent_1lc9z_38",item:"_item_1lc9z_38",left:"_left_1lc9z_51",center:"_center_1lc9z_57",right:"_right_1lc9z_61",fraction:"_fraction_1lc9z_65",time:"_time_1lc9z_71",user:"_user_1lc9z_82",userContent:"_userContent_1lc9z_85",name:"_name_1lc9z_90",tag:"_tag_1lc9z_99",times:"_times_1lc9z_107",activeUser:"_activeUser_1lc9z_111",avator:"_avator_1lc9z_131",btn:"_btn_1lc9z_136",num:"_num_1lc9z_142"};e("default",n({name:"leaderboard",setup:function(){var e=r();a();var n=i({tabIndex:0,musicList:[],isSignup:!1,isChallenge:!1,rankingMethod:"",score:0}),j=function(){var r=t(regeneratorRuntime.mark((function t(){var r,a,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,g.post("/api-student/open/activity/info/".concat(e.query.id));case 3:r=t.sent,a=r.data,n.rankingMethod=a.rankingMethod,i="TOTAL_SCORE"===a.rankingMethod?a.subjectInfos:a.activityMusicVoList,Array.isArray(i)&&(n.musicList=i.map((function(e){return e.rankingList=[],e})),n.isChallenge=!!i.filter((function(e){return e.join})).length),L.value=a.subjectUrl,n.isSignup=!!a.join,t.next=14;break;case 12:t.prev=12,t.t0=t.catch(0);case 14:case"end":return t.stop()}}),t,null,[[0,12]])})));return function(){return r.apply(this,arguments)}}(),C=function(){var r=t(regeneratorRuntime.mark((function t(){var r,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,g.get("/api-student/open/activityEvaluationRecord/queryRankingList",{params:{activityPlanId:e.query.id,activityEvaluationId:"TOTAL_SCORE"===n.rankingMethod?n.musicList[n.tabIndex].subjectId:n.musicList[n.tabIndex].evaluationId,limit:10}});case 3:r=t.sent,a=r.data,Array.isArray(a.rankingList)&&(n.musicList[n.tabIndex].rankingList=a.rankingList),a.userActivityRankingVo&&(n.score=a.userActivityRankingVo.score),t.next=11;break;case 9:t.prev=9,t.t0=t.catch(0);case 11:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(){return r.apply(this,arguments)}}(),L=c(),U=c(!1),S=c(100);l(t(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j();case 2:return e.next=4,C();case 4:case"end":return e.stop()}}),e)}))));var R=s((function(){var e,t;if(!n.musicList[n.tabIndex])return{};var r=o.user.data;if(!r.userId)return{};var a=n.musicList[n.tabIndex],i=null==a||null===(e=a.rankingList)||void 0===e?void 0:e.find((function(e){return e.userId==r.userId})),c=null==a||null===(t=a.rankingList)||void 0===t?void 0:t.findIndex((function(e){return e.userId==r.userId}));return c=c>-1?c+1:0,{join:a.join,score:(null==i?void 0:i.score)||0,isTop:!!i,heardUrl:r.heardUrl,username:r.username,userId:r.userId,step:c}})),A=c(),T=c();return function(){var e,t;return u("div",{class:I.leaderboard},[u("div",{class:I.container},[u("div",{class:I.headImg,ref:A},[u(h,{width:"100%",fit:"cover",src:L.value,onLoad:function(e){_((function(){var e=d(A).height;U.value=!0,S.value=e||100}))},onError:function(e){console.log(e)}},null)]),U.value&&u(p,{active:n.tabIndex,"onUpdate:active":function(e){return n.tabIndex=e},class:I.tabs,animated:!0,swipeable:!0,titleInactiveColor:"rgba(153,152,155,1)",titleActiveColor:"#fff",onChange:function(e){return C()}},(t=e=n.musicList.map((function(e){return u(z,{title:"TOTAL_SCORE"===n.rankingMethod?e.subjectName:e.musicSheetName},{default:function(){return[u("div",{class:[I.tabContent,!R.value.userId||n.isSignup&&n.isChallenge&&!R.value.join?null:I.hasUser],style:{height:"calc(100vh - ".concat(S.value,"px)")}},[u("div",{class:I.itemContent},[u("div",{class:I.item},[u("div",{class:I.left},[m("排名")]),u("div",{class:I.center},[m("昵称")]),u("div",{class:I.right},[m("评分")])]),e.rankingList.map((function(e,t){var r=(t+1).toString().padStart(2,"0");return u("div",{class:I.item},[u("div",{class:I.left},[0==t&&u(h,{src:x},null),1==t&&u(h,{src:y},null),2==t&&u(h,{src:k},null),0!=t&&1!=t&&2!=t&&r]),u("div",{class:I.center},[u(h,{width:"38px",height:"38px",fit:"cover",round:!0,src:e.userAvatar||w},null),u("div",{class:I.user},[u("div",{class:I.userContent},[u("span",{class:I.name},[e.username]),u("span",{class:I.tag},[e.userSubject])]),u("div",{class:I.times},[e.joinDate])])]),u("div",{class:I.right},[u("div",{class:I.fraction},[e.score,m("分")]),"TOTAL_SCORE"!==n.rankingMethod&&u("div",{class:I.time},[m("第 "),e.times,m(" 次评测")])])])})),!e.rankingList.length&&u(f,{image:"./assets/icon-emtry.76ea3a6a.png",description:"该".concat("TOTAL_SCORE"===n.rankingMethod?"声部":"曲目","暂无排名喔~")},null)]),u("div",{class:"van-safe-area-bottom"},null)])]}})})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!v(t)?e:{default:function(){return[e]}})),R.value.userId&&(n.isSignup?n.isChallenge?R.value.join?u("div",{ref:T,class:[I.activeUser,"van-safe-area-bottom"]},[u(b,{center:!0,title:R.value.username},{icon:function(){return u(h,{class:I.avator,fit:"cover",round:!0,src:R.value.heardUrl||w},null)},label:function(){return R.value.isTop?u("div",null,[m("您的评测已上榜! 当前排名"),u("span",{style:{color:"#FA6400"}},[" ",R.value.step])]):u("div",null,[m("您的评测暂未上榜,快去挑战吧!")])},value:function(){if(R.value.score||n.score)return u("span",{class:I.num},[R.value.score||n.score,m("分")])}})]):null:u("div",{ref:T,class:[I.activeUser,"van-safe-area-bottom"]},[u(b,{center:!0,title:R.value.username,label:"您尚未评测哦!"},{icon:function(){return u(h,{class:I.avator,fit:"cover",round:!0,src:R.value.heardUrl||w},null)}})]):u("div",{ref:T,class:[I.activeUser,"van-safe-area-bottom"]},[u(b,{center:!0,title:R.value.username,label:"您尚未报名参赛"},{icon:function(){return u(h,{class:I.avator,fit:"cover",round:!0,src:R.value.heardUrl||w},null)}})]))])])}}}))}}}))}();
|