1 |
- !function(){function e(e,t,n,i,r,c,s){try{var a=e[c](s),o=a.value}catch(u){return void n(u)}a.done?t(o):Promise.resolve(o).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 a(t){e(s,r,c,a,o,"next",t)}function o(t){e(s,r,c,a,o,"throw",t)}a(void 0)}))}}System.register(["./index.module-legacy.ee18af4b.js","./icon_level3-legacy.16a3757a.js","./index-legacy.fba2875c.js","./index-legacy.a026685b.js","./index-legacy.7dcec7b3.js","./index-legacy.f231f1c5.js","./index-legacy.d92f7da7.js","./logo-legacy.cf4b3bd2.js","./share-legacy.125a9021.js","./music-legacy.4cbbd879.js","./orderStatus-legacy.9b3fdd6c.js","./index-legacy.4b2a6a63.js","./icon_teacher-legacy.42ba77b1.js"],(function(e){"use strict";var n,i,r,c,s,a,o,u,l,d,p,g,f,v,m,h,b,y,k,I,T,_,j,S,O,C,M,x,w,A,E,L,R,N,D,P,B,z,U,G,q,H;return{setters:[function(e){n=e._,i=e.a,r=e.b,c=e.c,s=e.d,a=e.e,o=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.w,_=e.D,j=e.u,S=e.n,O=e.h,C=e.T,M=e.y,x=e.j,w=e.z,A=e.F,E=e.B,L=e.aR},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}],execute:function(){var Y=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":a,"./images/icon_no_level.png":o,"./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,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(),c=M.stringifyUrl({url:location.origin+"/accompany",query:{id:n.musicSheetId,behaviorId:e.behaviorId,client: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=20;break;case 18:t.prev=18,t.t0=t.catch(0);case 20:case"end":return t.stop()}}),t,null,[[0,18]])})))()},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),x("div",{class:v.review,style:{backgroundColor:this.activeInfo.backgroundUrl,backgroundSize:"contain"}},[x("img",{class:v.bannerImg,src:this.activeInfo.subjectUrl},null),x("div",{class:v.reviewContainer},[x("div",{class:[v.section,v.activeTime]},[x("div",{class:v.activeBg},[x("img",{src:Y("icon_time.png")},null),x("p",null,[x("span",null,[w("活动时间:")]),j(this.activeInfo.activityStart).format("YYYY-MM-DD"),w(" ~ "),j(this.activeInfo.activityEnd).format("YYYY-MM-DD")])])]),x("div",{class:[v.section]},[x("div",{class:v.title},[x("img",{src:Y("icon_arrow_left.png")},null),x("span",null,[w("活动介绍")]),x("img",{src:Y("icon_arrow_right.png")},null)]),x("div",{class:v.tips},[this.activeInfo.describe])]),x("div",{class:[v.section]},[x("h2",{class:v.title2},[x("span",null,[x("i",{class:v.titlePrefix},null),w("活动奖品")]),x("span",{class:v.titleTips,onClick:function(){return e.$router.push({path:"/leaderboard",query:{id:e.id}})}},[w("查看挑战排行榜"),x("img",{style:{width:"16px",marginLeft:"4px"},src:Y("icon-lv.png")},null)])]),this.rewardList.map((function(t,n){return x(A,null,[x("div",{class:v.prizeTitle},["TOTAL_SCORE"===e.rankingMethod?x("div",{class:v.prizeTitle_score},[w("总评测分数达到 "),e.activeInfo.rankingScore||0,w("分即可获奖")]):x(A,null,[0===n&&x(P,{class:v.prizeLevel,src:Y("icon_level.png")},null),1===n&&x(P,{class:v.prizeLevel,src:Y("icon_level2.png")},null),2===n&&x(P,{class:v.prizeLevel,src:Y("icon_level3.png")},null),w("第"),++n,w("名奖品")])]),x("div",{class:v.prizeSection},[t.map((function(e){return x("div",{class:[v.prize]},[x(P,{src:e.imgUrl},null),x("div",{class:v.prizeContainer},[x("div",{class:v.prizeName},[e.rewardName]),x("div",{class:v.prizeDesc},[e.rewardDescribe])])])}))])])}))]),x("div",{class:[v.section],style:{backgroundColor:"#fff"}},[x("h2",{class:v.title2},[x("span",null,[x("i",{class:v.titlePrefix},null),w("活动"),"TOTAL_SCORE"===this.rankingMethod?"声部":"曲目"]),"TOTAL_SCORE"===this.rankingMethod?x("span",{class:v.titleTips,onClick:function(){e.$router.push({path:"/track-subject-song",query:{id:e.id}})}},[w("查看曲目")]):x("span",{class:v.titleTips},[w("共"),this.activityMusic.length||0,w("首曲目")])]),this.activityMusic.map((function(t){return x(D,{class:v.musicItem,border:!1},{default:function(){return[x(N,{center:!0,titleClass:[v.musicTitle,"TOTAL_SCORE"==e.rankingMethod&&v.musicTitleScore],isLink:"TOTAL_SCORE"===e.rankingMethod},{icon:function(){return x(P,{src:Y("TOTAL_SCORE"!==e.rankingMethod?"icon_music.png":"icon_subject.png"),class:v.iconMusic},null)},title:function(){return x("span",{class:v.musicName},["TOTAL_SCORE"===e.rankingMethod?t.subjectName:t.musicSheetName])},value:function(){return x("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])}}),x(N,{center:!0,class:v.cellLevel},{icon:function(){return x("div",{class:v.kingSection},[x(P,{src:Y("icon_king.png"),class:v.iconKing},null),x("p",{class:v.score},[t.userId?t.score:"--",x("span",null,[w("分")])])])},title:function(){return x("div",{class:v.users},[x("div",{class:v.userInfo},[x("div",{class:v.userImg},[t.userId?x(A,null,[x(P,{src:t.userAvatar||H,class:v.userLogo,fit:"cover"},null),x("img",{src:Y("icon_level.png"),class:v.iconLevel},null)]):x("div",{class:v.userLogo},[x("img",{class:v.img,src:Y("icon_no_level.png")},null)])]),x("div",{class:v.userName},[t.userId?x(A,null,[x("p",{class:v.name},[t.username]),x("p",null,[x("span",{class:v.subjectName},[t.userSubject])])]):x("span",{class:v.noText},[w("虚位以待")])])]),x("div",{class:v.userBtn},[x(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("立刻挑战")]}})])])}})]}})}))]),x("div",{class:[v.section]},[x("div",{class:v.title},[x("img",{src:Y("icon_arrow_left.png")},null),x("span",null,[w("活动规则")]),x("img",{src:Y("icon_arrow_right.png")},null)]),x("div",{class:v.tips},[this.activeInfo.ruleDescribe])])]),1!==this.activeInfo.join&&x(R,{position:"bottom"},{default:function(){return[x("div",{class:v.btnGroup},[x(E,{round:!0,class:v.submit,block:!0,onClick:e.onJoinActve},{default:function(){return[w("报名参与")]}})])]}}),x(L,{show:this.popupStatus,"onUpdate:show":function(t){return e.popupStatus=t},round:!0,style:{width:"90%"},closeOnClickOverlay:!1},{default:function(){return[x("div",{class:v.popupContainer},[x("div",{class:[v.popupTitle,"van-hairline--bottom"]},[x("i",{class:v.line},null),w("提示"),x("img",{src:Y("icon_close.png"),class:v.popupClose,onClick:function(){return e.popupStatus=!1}},null)]),x("div",{class:v.popupContent},[k().isApp?x(A,null,["TOTAL_SCORE"===e.rankingMethod?x(A,null,[x("p",null,[w("确定要参加 "),x("span",null,[e.selectMusic.subjectName]),w("(声部)的比拼吗?")]),x("p",{class:v.popupTips},[w("每位用户仅可选择一个声部参与挑战哦!")])]):x(A,null,[x("p",null,[w("确定要参加"),x("span",null,[e.selectMusic.musicSheetName]),w("评测"),x("span",null,[q[e.activeInfo.evaluationDifficulty]]),w("的比拼吗?")]),x("p",{class:v.popupTips},[w("每位用户仅可选择一首曲目的一个难度哦!")])])]):x("div",{class:v.appOut},[x("img",{src:B},null),x("p",null,[w("请在酷乐秀APP内打开活动链接!")])])]),k().isApp?x("div",{class:["btnGroup, btnMore",v.popupBtn]},[x(E,{type:"primary",round:!0,plain:!0,onClick:function(){return e.popupStatus=!1}},{default:function(){return[w("再想想")]}}),x(E,{type:"primary",round:!0,onClick:e.onOpenMusic},{default:function(){return[w("就是它了")]}})]):x("div",{class:["btnGroup, btnMore",v.popupBtn]},[x(E,{type:"primary",round:!0,onClick:e.onOpenApp},{default:function(){return[w("确定")]}})])])]}}),this.wxStatus&&x("div",{class:v.wxpopup,onClick:function(){e.wxStatus=!1}},[x("img",{src:Y("wx_bg.png"),alt:""},null)])])}}))}}}))}();
|