1 |
- !function(){function e(e,t,r,n,i,a,o){try{var s=e[a](o),c=s.value}catch(_){return void r(_)}s.done?t(c):Promise.resolve(c).then(n,i)}function t(t){return function(){var r=this,n=arguments;return new Promise((function(i,a){var o=t.apply(r,n);function s(t){e(o,i,a,s,c,"next",t)}function c(t){e(o,i,a,s,c,"throw",t)}s(void 0)}))}}var r=document.createElement("style");r.innerHTML="._headImg_15rgb_1{display:flex}._tabs_15rgb_4{margin-top:-1.12rem}._tabs_15rgb_4 .van-tabs__wrap{height:1.12rem}._tabs_15rgb_4 .van-tabs__nav{background-color:rgba(0,0,0,.68);backdrop-filter:blur(.26667rem);-webkit-backdrop-filter:blur(.26667rem)}._tabs_15rgb_4 .van-tabs__line{background-color:transparent!important;height:0;width:0;border:.21333rem solid transparent;border-bottom-color:#fff;border-radius:0}._tabs_15rgb_4 .van-empty__image{width:2.66667rem;height:3.04rem}._tabContent_15rgb_27{position:relative;padding:.32rem;box-sizing:border-box;overflow-y:auto}._itemContent_15rgb_33{padding:.32rem;border-radius:.32rem;background-color:#fff;min-height:100%;box-sizing:border-box}._item_15rgb_33{display:flex;padding:.26667rem 0;box-sizing:border-box;align-items:center}._item_15rgb_33 ._left_15rgb_46{width:.85333rem;margin:0 .56rem 0 .05333rem;text-align:center;font-weight:700}._item_15rgb_33 ._center_15rgb_52{display:flex;align-items:center}._item_15rgb_33 ._right_15rgb_56{margin-left:auto;text-align:right}._item_15rgb_33 ._right_15rgb_56 ._fraction_15rgb_60{font-size:.37333rem;font-weight:600;color:#fa6400;margin-bottom:.10667rem}._item_15rgb_33 ._right_15rgb_56 ._time_15rgb_66{font-size:.32rem;color:#999}._item_15rgb_33:first-child{padding-top:0;border-bottom:.02667rem solid #eee}._item_15rgb_33:last-child{padding-bottom:0}._item_15rgb_33 ._user_15rgb_77{margin-left:.16rem}._item_15rgb_33 ._user_15rgb_77 ._userContent_15rgb_80{display:flex;align-items:center;margin-bottom:.10667rem}._item_15rgb_33 ._user_15rgb_77 ._name_15rgb_85{font-size:.4rem;color:#333;margin-right:.16rem;max-width:2rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._item_15rgb_33 ._user_15rgb_77 ._tag_15rgb_94{font-size:.32rem;background-color:#ffe2b2;color:#ff8c00;border-radius:.10667rem;margin-right:.10667rem;padding:.02667rem .05333rem}._item_15rgb_33 ._user_15rgb_77 ._times_15rgb_102{font-size:.32rem;color:#999}\n",document.head.appendChild(r),System.register(["./ResizeObserver.es-legacy.8d60aee1.js","./index-legacy.4a75d877.js","./index-legacy.6a5df59c.js","./index-legacy.7e047c4c.js","./index-legacy.183eabe8.js","./icon_level3-legacy.31c50e94.js","./icon_teacher-legacy.42ba77b1.js","./index-legacy.87bcd48f.js","./use-id-legacy.54528695.js","./use-tab-status-legacy.1f35f332.js","./use-refs-legacy.82f31dee.js"],(function(e){"use strict";var r,n,i,a,o,s,c,_,u,g,l,d,b,m,f,v,p,h,y,x;return{setters:[function(e){r=e.d,n=e.P,i=e.Q,a=e.S,o=e.U,s=e.V,c=e.j,_=e.X,u=e.A,g=e.Z,l=e.$,d=e.y},function(e){b=e.I},function(){},function(){},function(e){m=e.T,f=e.a},function(e){v=e.I,p=e.c,h=e.d},function(e){y=e.i},function(e){x=e.C},function(){},function(){},function(){}],execute:function(){var k={headImg:"_headImg_15rgb_1",tabs:"_tabs_15rgb_4",tabContent:"_tabContent_15rgb_27",itemContent:"_itemContent_15rgb_33",item:"_item_15rgb_33",left:"_left_15rgb_46",center:"_center_15rgb_52",right:"_right_15rgb_56",fraction:"_fraction_15rgb_60",time:"_time_15rgb_66",user:"_user_15rgb_77",userContent:"_userContent_15rgb_80",name:"_name_15rgb_85",tag:"_tag_15rgb_94",times:"_times_15rgb_102"};e("default",r({name:"leaderboard",setup:function(){var e=n();i();var r=a({tabIndex:0,musicList:[],rankingMethod:""}),w=function(){var n=t(regeneratorRuntime.mark((function t(){var n,i,a,o,s,c,_;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,d.post("/api-student/open/activity/info/".concat(e.query.id));case 3:n=t.sent,i=n.data,a=i.rankingMethod,o=i.subjectInfos,s=i.activityMusicVoList,i.shareUrl,c=i.subjectUrl,r.rankingMethod=a,_="TOTAL_SCORE"===a?o:s,Array.isArray(_)&&(r.musicList=_.map((function(e){return e.rankingList=[],e}))),j.value=c,t.next=18;break;case 16:t.prev=16,t.t0=t.catch(0);case 18:case"end":return t.stop()}}),t,null,[[0,16]])})));return function(){return n.apply(this,arguments)}}(),C=function(){var n=t(regeneratorRuntime.mark((function t(){var n,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,d.get("/api-student/open/activityEvaluationRecord/queryRankingList",{params:{activityPlanId:e.query.id,activityEvaluationId:"TOTAL_SCORE"===r.rankingMethod?r.musicList[r.tabIndex].subjectId:r.musicList[r.tabIndex].evaluationId,limit:10}});case 3:n=t.sent,i=n.data,Array.isArray(i.rankingList)&&(r.musicList[r.tabIndex].rankingList=i.rankingList),t.next=10;break;case 8:t.prev=8,t.t0=t.catch(0);case 10:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(){return n.apply(this,arguments)}}(),j=o(),L=o(!1),I=o(100);s(t(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w();case 2:return e.next=4,C();case 4:case"end":return e.stop()}}),e)}))));var R=o();return function(){var e,t;return c("div",{class:k.leaderboard},[c(x,null,null),c("div",{class:k.container},[c("div",{class:k.headImg,ref:R},[c(b,{width:"100%",fit:"cover",src:j.value,onLoad:function(e){_((function(){var e;L.value=!0,I.value=(null===(e=R.value)||void 0===e?void 0:e.offsetHeight)||100}))},onError:function(e){console.log(e)}},null)]),L.value&&c(m,{active:r.tabIndex,"onUpdate:active":function(e){return r.tabIndex=e},class:k.tabs,animated:!0,swipeable:!0,titleInactiveColor:"rgba(153,152,155,1)",titleActiveColor:"#fff",onChange:function(e){return C()}},(t=e=r.musicList.map((function(e){return c(f,{title:"TOTAL_SCORE"===r.rankingMethod?e.subjectName:e.musicSheetName},{default:function(){return[c("div",{class:[k.tabContent,"van-safe-area-bottom"],style:{height:"calc(100vh - ".concat(I.value,"px)")}},[c("div",{class:k.itemContent},[c("div",{class:k.item},[c("div",{class:k.left},[u("排名")]),c("div",{class:k.center},[u("昵称")]),c("div",{class:k.right},[u("评分")])]),e.rankingList.map((function(e,t){var n=(t+1).toString().padStart(2,"0");return c("div",{class:k.item},[c("div",{class:k.left},[0==t&&c(b,{src:v},null),1==t&&c(b,{src:p},null),2==t&&c(b,{src:h},null),0!=t&&1!=t&&2!=t&&n]),c("div",{class:k.center},[c(b,{width:"38px",height:"38px",fit:"cover",round:!0,src:e.userAvatar||y},null),c("div",{class:k.user},[c("div",{class:k.userContent},[c("span",{class:k.name},[e.username]),c("span",{class:k.tag},[e.userSubject])]),c("div",{class:k.times},[e.joinDate])])]),c("div",{class:k.right},[c("div",{class:k.fraction},[e.score,u("分")]),"TOTAL_SCORE"!==r.rankingMethod&&c("div",{class:k.time},[u("第 "),e.times,u(" 次评测")])])])})),!e.rankingList.length&&c(g,{image:"./assets/icon-emtry.76ea3a6a.png",description:"该".concat("TOTAL_SCORE"===r.rankingMethod?"声部":"曲目","暂无排名喔~")},null)])])]}})})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!l(t)?e:{default:function(){return[e]}}))])])}}}))}}}))}();
|