index-legacy.77d97a46.js 14 KB

1
  1. !function(){function e(e,t,n,i,r,c,s){try{var o=e[c](s),a=o.value}catch(u){return void n(u)}o.done?t(a):Promise.resolve(a).then(i,r)}function t(t){return function(){var n=this,i=arguments;return new Promise((function(r,c){var s=t.apply(n,i);function o(t){e(s,r,c,o,a,"next",t)}function a(t){e(s,r,c,o,a,"throw",t)}o(void 0)}))}}System.register(["./index.module-legacy.ee18af4b.js","./icon_level3-legacy.16a3757a.js","./ResizeObserver.es-legacy.8d60aee1.js","./index-legacy.02065493.js","./index-legacy.610f0a70.js","./index-legacy.fd89cccf.js","./index-legacy.4a75d877.js","./logo-legacy.cf4b3bd2.js","./share-legacy.cd86940e.js","./music-legacy.33d8b690.js","./orderStatus-legacy.e7da1c46.js","./index-legacy.ce3d9289.js","./icon_teacher-legacy.42ba77b1.js","./index-legacy.87bcd48f.js","./index-legacy.bbc2b10e.js"],(function(e){"use strict";var n,i,r,c,s,o,a,u,l,d,p,g,f,v,m,h,b,y,k,I,T,_,j,S,O,C,x,M,w,A,E,L,R,N,D,P,B,z,U,G,q,H,Y;return{setters:[function(e){n=e._,i=e.a,r=e.b,c=e.c,s=e.d,o=e.e,a=e.f,u=e.g,l=e.h,d=e.i,p=e.j,g=e.k,f=e.l,v=e.s},function(e){m=e._,h=e.c,b=e.d},function(e){y=e.d,k=e.f,I=e.g,T=e.y,_=e.D,j=e.w,S=e.n,O=e.h,C=e.T,x=e.v,M=e.j,w=e.A,A=e.F,E=e.B,L=e.aS},function(e){R=e.C},function(e){N=e.C},function(e){D=e.C},function(e){P=e.I},function(e){B=e.l},function(e){z=e.s},function(e){U=e.g},function(e){G=e.o},function(e){q=e.d},function(e){H=e.i},function(e){Y=e.C},function(){}],execute:function(){var F=e("getAssetsHomeFile",(function(e){var t="./images/".concat(e);return{"./images/icon-lv.png":n,"./images/icon_arrow_left.png":i,"./images/icon_arrow_right.png":r,"./images/icon_close.png":c,"./images/icon_king.png":s,"./images/icon_level.png":m,"./images/icon_level2.png":h,"./images/icon_level3.png":b,"./images/icon_music.png":o,"./images/icon_no_level.png":a,"./images/icon_score.png":u,"./images/icon_subject.png":l,"./images/icon_time.png":d,"./images/star_bg.png":p,"./images/title_bg.png":g,"./images/wx_bg.png":f}[t].default}));e("default",y({name:"track-review-activity",data:function(){var e=this.$route.query;return{id:e.id,recomUserId:e.recomUserId||"",activeInfo:{},popupStatus:!1,wxStatus:!1,behaviorId:U(),selectMusic:{},hiddenProperty:null}},computed:{rankingMethod:function(){return this.activeInfo.rankingMethod||""},activityMusic:function(){var e=this.activeInfo;return("TOTAL_SCORE"===e.rankingMethod?e.subjectInfos:e.activityMusicVoList)||[]},userSelectMusic:function(){var e=!1;return this.activityMusic.forEach((function(t){1===t.join&&(e=!0)})),e},rewardList:function(){var e=this.activeInfo,t=e.activityRewardList||[];if(t&&t.length>0)if("TOTAL_SCORE"===e.rankingMethod)t=[t];else{var n=t.sort((function(e,t){return Number(e.group)<Number(t.group)?-1:1}));t=this.groupBy(n,(function(e){return[e.group]}))}return t||[]}},mounted:function(){var e=this;return t(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getMusicInfo();case 2:if(k().isApp){t.next=6;break}t.next=15;break;case 6:if("TEACHER"!==I.platformType){t.next=11;break}return e.onBackDialog("请使用酷乐秀学生端扫码打开"),t.abrupt("return");case 11:console.log(e.hiddenProperty,"hidden property"),e.hiddenProperty="hidden"in document?"hidden":"webkitHidden"in document?"webkitHidden":"mozHidden"in document?"mozHidden":null,n=e.hiddenProperty.replace(/hidden/i,"visibilitychange"),document.addEventListener(n,e.onVisibilityChange);case 15:e.checkActivityTime();case 16:case"end":return t.stop()}}),t)})))()},unmounted:function(){if(this.hiddenProperty){var e=this.hiddenProperty.replace(/hidden/i,"visibilitychange");document.removeEventListener(e,this.onVisibilityChange)}},methods:{groupBy:function(e,t){var n={};return e.forEach((function(e){var i=JSON.stringify(t(e));n[i]=n[i]||[],n[i].push(e)})),Object.keys(n).map((function(e){return n[e]}))},onVisibilityChange:function(){document[this.hiddenProperty]||this.getMusicInfo()},getMusicInfo:function(){var e=this;return t(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,T.post("/api-student/open/activity/info/"+e.id);case 3:n=t.sent,e.activeInfo=n.data,document.title=e.activeInfo.activityName,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]])})))()},checkActivityTime:function(){try{var e=this.activeInfo;if(1!==e.activityState)return _.alert({message:"活动已结束,感谢你的关注!",theme:"round-button",confirmButtonColor:"#2dc7aa"}),this.onBackDialog("活动已结束,感谢你的关注!"),!1;var t=j(),n=j(e.activityStart),i=j(e.activityEnd);return j(t).isBefore(j(n))?(this.onBackDialog("活动尚未开始,请您耐心等待!"),!1):!!j(t).isBefore(j(i))||(this.onBackDialog("活动已结束,感谢你的关注!"),!1)}catch(r){}},onBackDialog:function(e){_.alert({message:e,theme:"round-button",confirmButtonColor:"#2dc7aa"}).then((function(){S({api:"back"})}))},onJoinActve:function(){var e=this;return t(regeneratorRuntime.mark((function t(){var n,i,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(k().isApp){t.next=4;break}return e.popupStatus=!0,O(),t.abrupt("return");case 4:if(n=e.activeInfo,t.prev=5,e.checkActivityTime()){t.next=8;break}return t.abrupt("return");case 8:if("CHARGE"!==n.registrationMethod){t.next=22;break}return t.next=11,T.post("/api-student/userOrder/getPendingOrder",{data:{goodType:"ACTI_REGIST",bizId:n.id}});case 11:r=t.sent,G.orderObject.orderType="ACTI_REGIST",G.orderObject.orderName=n.activityName,G.orderObject.orderDesc=n.activityName,G.orderObject.actualPrice=n.registrationPrice,G.orderObject.orderNo=(null===(i=r.data)||void 0===i?void 0:i.orderNo)||"",G.orderObject.recomUserId=e.recomUserId,G.orderObject.orderList=[{orderType:"ACTI_REGIST",goodsName:n.activityName,activityId:n.id,actualPrice:n.registrationPrice,price:n.registrationPrice,recomUserId:e.recomUserId}],e.$router.push({path:"/orderDetail",query:{orderType:"ACTI_REGIST",activityId:n.id}}),t.next=26;break;case 22:return t.next=24,T.post("/api-student/activity/joinActivity/".concat(n.id));case 24:setTimeout((function(){C("报名成功")}),300),e.getMusicInfo();case 26:t.next=30;break;case 28:t.prev=28,t.t0=t.catch(5);case 30:case"end":return t.stop()}}),t,null,[[5,28]])})))()},onOpenMusic:function(){var e=this;return t(regeneratorRuntime.mark((function t(){var n,i,r,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,n=e.selectMusic,console.log(n,"selectMusic"),i="","TOTAL_SCORE"===e.rankingMethod?(e.activeInfo.activityMusicVoList||[]).forEach((function(e){console.log(e,n),e.subjectId!=n.subjectId||i||(i=e.evaluationId)})):i=n.evaluationId,1===n.join){t.next=9;break}return t.next=8,T.post("/api-student/activity/evaluation/".concat(i));case 8:e.selectMusic.join=1;case 9:if(e.popupStatus=!1,"TOTAL_SCORE"!==e.rankingMethod){t.next=13;break}return e.$router.push({path:"/track-song",query:{subjectId:n.subjectId,id:e.id}}),t.abrupt("return");case 13:r=k(),"/klx-music-score/",c=x.stringifyUrl({url:location.origin+"/klx-music-score/",query:{id:n.musicSheetId,behaviorId:e.behaviorId,systemType:r.isStudent?"student":"teacher",setting:JSON.stringify({mode:"EVALUATING",resets:["SPEED"],difficulty:n.evaluationDifficulty,feeType:"FREE",submitData:{evaluationId:e.selectMusic.evaluationId}})}}),S({api:"openAccompanyWebView",content:{url:c,orientation:0,isHideTitle:!0,statusBarTextColor:!1,isOpenLight:!0}}),t.next=21;break;case 19:t.prev=19,t.t0=t.catch(0);case 21:case"end":return t.stop()}}),t,null,[[0,19]])})))()},onOpenApp:function(){if(k().isApp)this.popupStatus=!1;else{if(k().weixin)return void(this.wxStatus=!0);var e=location.origin+"/student/#/track-review-activity?id=".concat(this.id,"&recomUserId=").concat(this.recomUserId);z(e,{}),setTimeout((function(){window.location.href=location.origin+"/student/#/download"}),3e3)}}},render:function(){var e=this;return console.log(this.activeInfo),console.log(this.activeInfo.subjectUrl+"?time"+ +new Date),M("div",{class:v.review,style:{backgroundColor:this.activeInfo.backgroundUrl,backgroundSize:"contain"}},[M(Y,null,null),M("img",{class:v.bannerImg,src:this.activeInfo.subjectUrl},null),M("div",{class:v.reviewContainer},[M("div",{class:[v.section,v.activeTime]},[M("div",{class:v.activeBg},[M("img",{src:F("icon_time.png")},null),M("p",null,[M("span",null,[w("活动时间:")]),j(this.activeInfo.activityStart).format("YYYY-MM-DD"),w(" ~ "),j(this.activeInfo.activityEnd).format("YYYY-MM-DD")])])]),M("div",{class:[v.section]},[M("div",{class:v.title},[M("img",{src:F("icon_arrow_left.png")},null),M("span",null,[w("活动介绍")]),M("img",{src:F("icon_arrow_right.png")},null)]),M("div",{class:v.tips},[this.activeInfo.describe])]),M("div",{class:[v.section]},[M("h2",{class:v.title2},[M("span",null,[M("i",{class:v.titlePrefix},null),w("活动奖品")]),M("span",{class:v.titleTips,onClick:function(){return e.$router.push({path:"/leaderboard",query:{id:e.id}})}},[w("查看挑战排行榜"),M("img",{style:{width:"16px",marginLeft:"4px"},src:F("icon-lv.png")},null)])]),this.rewardList.map((function(t,n){return M(A,null,[M("div",{class:v.prizeTitle},["TOTAL_SCORE"===e.rankingMethod?M("div",{class:v.prizeTitle_score},[w("总评测分数达到 "),e.activeInfo.rankingScore||0,w("分即可获奖")]):M(A,null,[0===n&&M(P,{class:v.prizeLevel,src:F("icon_level.png")},null),1===n&&M(P,{class:v.prizeLevel,src:F("icon_level2.png")},null),2===n&&M(P,{class:v.prizeLevel,src:F("icon_level3.png")},null),w("第"),++n,w("名奖品")])]),M("div",{class:v.prizeSection},[t.map((function(e){return M("div",{class:[v.prize]},[M(P,{src:e.imgUrl},null),M("div",{class:v.prizeContainer},[M("div",{class:v.prizeName},[e.rewardName]),M("div",{class:v.prizeDesc},[e.rewardDescribe])])])}))])])}))]),M("div",{class:[v.section],style:{backgroundColor:"#fff"}},[M("h2",{class:v.title2},[M("span",null,[M("i",{class:v.titlePrefix},null),w("活动"),"TOTAL_SCORE"===this.rankingMethod?"声部":"曲目"]),"TOTAL_SCORE"===this.rankingMethod?M("span",{class:v.titleTips,onClick:function(){e.$router.push({path:"/track-subject-song",query:{id:e.id}})}},[w("查看曲目")]):M("span",{class:v.titleTips},[w("共"),this.activityMusic.length||0,w("首曲目")])]),this.activityMusic.map((function(t){return M(D,{class:v.musicItem,border:!1},{default:function(){return[M(N,{center:!0,titleClass:[v.musicTitle,"TOTAL_SCORE"==e.rankingMethod&&v.musicTitleScore],isLink:"TOTAL_SCORE"===e.rankingMethod},{icon:function(){return M(P,{src:F("TOTAL_SCORE"!==e.rankingMethod?"icon_music.png":"icon_subject.png"),class:v.iconMusic},null)},title:function(){return M("span",{class:v.musicName},["TOTAL_SCORE"===e.rankingMethod?t.subjectName:t.musicSheetName])},value:function(){return M("span",{onClick:function(){"TOTAL_SCORE"===e.rankingMethod&&e.$router.push({path:"/track-subject-song",query:{id:e.id,subjectId:t.subjectId}})}},["TOTAL_SCORE"===e.rankingMethod?"共".concat(t.musicNums,"首活动曲目"):t.musicSubject])}}),M(N,{center:!0,class:v.cellLevel},{icon:function(){return M("div",{class:v.kingSection},[M(P,{src:F("icon_king.png"),class:v.iconKing},null),M("p",{class:v.score},[t.userId?t.score:"--",M("span",null,[w("分")])])])},title:function(){return M("div",{class:v.users},[M("div",{class:v.userInfo},[M("div",{class:v.userImg},[t.userId?M(A,null,[M(P,{src:t.userAvatar||H,class:v.userLogo,fit:"cover"},null),M("img",{src:F("icon_level.png"),class:v.iconLevel},null)]):M("div",{class:v.userLogo},[M("img",{class:v.img,src:F("icon_no_level.png")},null)])]),M("div",{class:v.userName},[t.userId?M(A,null,[M("p",{class:v.name},[t.username]),M("p",null,[M("span",{class:v.subjectName},[t.userSubject])])]):M("span",{class:v.noText},[w("虚位以待")])])]),M("div",{class:v.userBtn},[M(E,{round:!0,style:{padding:"0 8px",height:"32px"},color:"linear-gradient(180deg, #FFA200 0%, #FF6900 100%)",disabled:0===e.activeInfo.join||e.userSelectMusic&&1!=t.join,onClick:function(){e.checkActivityTime()&&(e.selectMusic=t,1===t.join?"TOTAL_SCORE"===e.rankingMethod?e.$router.push({path:"/track-song",query:{id:e.id,subjectId:t.subjectId,subjectName:t.subjectName}}):e.onOpenMusic():e.popupStatus=!0)}},{default:function(){return[w("立刻挑战")]}})])])}})]}})}))]),M("div",{class:[v.section]},[M("div",{class:v.title},[M("img",{src:F("icon_arrow_left.png")},null),M("span",null,[w("活动规则")]),M("img",{src:F("icon_arrow_right.png")},null)]),M("div",{class:v.tips},[this.activeInfo.ruleDescribe])])]),1!==this.activeInfo.join&&M(R,{position:"bottom"},{default:function(){return[M("div",{class:v.btnGroup},[M(E,{round:!0,class:v.submit,block:!0,onClick:e.onJoinActve},{default:function(){return[w("报名参与")]}})])]}}),M(L,{show:this.popupStatus,"onUpdate:show":function(t){return e.popupStatus=t},round:!0,style:{width:"90%"},closeOnClickOverlay:!1},{default:function(){return[M("div",{class:v.popupContainer},[M("div",{class:[v.popupTitle,"van-hairline--bottom"]},[M("i",{class:v.line},null),w("提示"),M("img",{src:F("icon_close.png"),class:v.popupClose,onClick:function(){return e.popupStatus=!1}},null)]),M("div",{class:v.popupContent},[k().isApp?M(A,null,["TOTAL_SCORE"===e.rankingMethod?M(A,null,[M("p",null,[w("确定要参加 "),M("span",null,[e.selectMusic.subjectName]),w("(声部)的比拼吗?")]),M("p",{class:v.popupTips},[w("每位用户仅可选择一个声部参与挑战哦!")])]):M(A,null,[M("p",null,[w("确定要参加"),M("span",null,[e.selectMusic.musicSheetName]),w("评测"),M("span",null,[q[e.activeInfo.evaluationDifficulty]]),w("的比拼吗?")]),M("p",{class:v.popupTips},[w("每位用户仅可选择一首曲目的一个难度哦!")])])]):M("div",{class:v.appOut},[M("img",{src:B},null),M("p",null,[w("请在酷乐秀APP内打开活动链接!")])])]),k().isApp?M("div",{class:["btnGroup, btnMore",v.popupBtn]},[M(E,{type:"primary",round:!0,plain:!0,onClick:function(){return e.popupStatus=!1}},{default:function(){return[w("再想想")]}}),M(E,{type:"primary",round:!0,onClick:e.onOpenMusic},{default:function(){return[w("就是它了")]}})]):M("div",{class:["btnGroup, btnMore",v.popupBtn]},[M(E,{type:"primary",round:!0,onClick:e.onOpenApp},{default:function(){return[w("确定")]}})])])]}}),this.wxStatus&&M("div",{class:v.wxpopup,onClick:function(){e.wxStatus=!1}},[M("img",{src:F("wx_bg.png"),alt:""},null)])])}}))}}}))}();