index-legacy.04ef6944.js 9.6 KB

1
  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.b2528a15.js","./index-legacy.207dc8c2.js","./index-legacy.ca42ae97.js","./index-legacy.4f922f18.js","./index-legacy.3f4943f0.js","./index-legacy.7e6f30e7.js","./icon_level3-legacy.16a3757a.js","./icon_teacher-legacy.42ba77b1.js","./use-id-legacy.4f071235.js","./use-tab-status-legacy.5c2c2da3.js","./use-refs-legacy.2f8acfce.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.P,a=e.Q,i=e.S,c=e.U,l=e.V,s=e.W,o=e.i,u=e.X,_=e.Y,d=e.A,m=e.Z,f=e.$,v=e.e,g=e.s},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}),C=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,v.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)}}(),j=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,v.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,C();case 2:return e.next=4,j();case 4:case"end":return e.stop()}}),e)}))));var A=s((function(){var e,t;if(!n.musicList[n.tabIndex])return{};var r=g.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}})),R=c(),T=c();return function(){var e,t;return o("div",{class:I.leaderboard},[o("div",{class:I.container},[o("div",{class:I.headImg,ref:R},[o(h,{width:"100%",fit:"cover",src:L.value,onLoad:function(e){u((function(){var e=_(R).height;U.value=!0,S.value=e||100}))},onError:function(e){console.log(e)}},null)]),U.value&&o(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 j()}},(t=e=n.musicList.map((function(e){return o(z,{title:"TOTAL_SCORE"===n.rankingMethod?e.subjectName:e.musicSheetName},{default:function(){return[o("div",{class:[I.tabContent,!A.value.userId||n.isSignup&&n.isChallenge&&!A.value.join?null:I.hasUser],style:{height:"calc(100vh - ".concat(S.value,"px)")}},[o("div",{class:I.itemContent},[o("div",{class:I.item},[o("div",{class:I.left},[d("排名")]),o("div",{class:I.center},[d("昵称")]),o("div",{class:I.right},[d("评分")])]),e.rankingList.map((function(e,t){var r=(t+1).toString().padStart(2,"0");return o("div",{class:I.item},[o("div",{class:I.left},[0==t&&o(h,{src:x},null),1==t&&o(h,{src:y},null),2==t&&o(h,{src:k},null),0!=t&&1!=t&&2!=t&&r]),o("div",{class:I.center},[o(h,{width:"38px",height:"38px",fit:"cover",round:!0,src:e.userAvatar||w},null),o("div",{class:I.user},[o("div",{class:I.userContent},[o("span",{class:I.name},[e.username]),o("span",{class:I.tag},[e.userSubject])]),o("div",{class:I.times},[e.joinDate])])]),o("div",{class:I.right},[o("div",{class:I.fraction},[e.score,d("分")]),"TOTAL_SCORE"!==n.rankingMethod&&o("div",{class:I.time},[d("第 "),e.times,d(" 次评测")])])])})),!e.rankingList.length&&o(m,{image:"./assets/icon-emtry.76ea3a6a.png",description:"该".concat("TOTAL_SCORE"===n.rankingMethod?"声部":"曲目","暂无排名喔~")},null)]),o("div",{class:"van-safe-area-bottom"},null)])]}})})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!f(t)?e:{default:function(){return[e]}})),A.value.userId&&(n.isSignup?n.isChallenge?A.value.join?o("div",{ref:T,class:[I.activeUser,"van-safe-area-bottom"]},[o(b,{center:!0,title:A.value.username},{icon:function(){return o(h,{class:I.avator,fit:"cover",round:!0,src:A.value.heardUrl||w},null)},label:function(){return A.value.isTop?o("div",null,[d("您的评测已上榜! 当前排名"),o("span",{style:{color:"#FA6400"}},[" ",A.value.step])]):o("div",null,[d("您的评测暂未上榜,快去挑战吧!")])},value:function(){if(A.value.score||n.score)return o("span",{class:I.num},[A.value.score||n.score,d("分")])}})]):null:o("div",{ref:T,class:[I.activeUser,"van-safe-area-bottom"]},[o(b,{center:!0,title:A.value.username,label:"您尚未评测哦!"},{icon:function(){return o(h,{class:I.avator,fit:"cover",round:!0,src:A.value.heardUrl||w},null)}})]):o("div",{ref:T,class:[I.activeUser,"van-safe-area-bottom"]},[o(b,{center:!0,title:A.value.username,label:"您尚未报名参赛"},{icon:function(){return o(h,{class:I.avator,fit:"cover",round:!0,src:A.value.heardUrl||w},null)}})]))])])}}}))}}}))}();