1 |
- System.register(["./index-legacy-216ebbcc.js","./instrument-legacy-848a3720.js","./plyr.min-legacy-2197a4aa.js","./vue3-lottie.es-legacy-5f286f1a.js","./index-legacy-84caf5f7.js","./index-legacy-4b1acba5.js","./index-legacy-1a0614ea.js"],(function(e,i){"use strict";var t,l,a,n,o,r,s,d,u,c,_,m,h,v,p,g,y,f,b,w,x,F,k,I,P,S,N,C,E,L,T,j,B,R,A=document.createElement("style");return A.textContent="._skeleton_vbtuh_1{position:fixed;left:0;top:0;width:100vw;height:100vh;padding:.53333rem .8rem;background-color:#fff;z-index:10;--van-skeleton-paragraph-height: .8rem}._detail_vbtuh_12{width:100vw;min-height:100vh;--header-height: 1.65333rem;background:#f8f2e8}._detail_vbtuh_12 #cursorImg-0{display:none!important}._detail_vbtuh_12 #selectionBox{pointer-events:none}._detail_vbtuh_12 ._headHeight_vbtuh_24{position:fixed;left:0;top:0;width:100%;height:var(--header-height);transition:margin .3s;z-index:10}._detail_vbtuh_12 ._headHeight_vbtuh_24._headHide_vbtuh_33{margin-top:calc(0Px - var(--header-height))}._detail_vbtuh_12 ._container_vbtuh_36{position:relative;margin:0 .26667rem;border-radius:.26667rem;padding-top:calc(var(--header-height) + 1.44rem)}._detail_vbtuh_12 ._container_vbtuh_36 #musicAndSelection{overflow:initial;height:initial;max-height:initial}._detail_vbtuh_12 ._container_vbtuh_36 #musicAndSelection>#osmdCanvasPage1{position:relative!important}._musicName_vbtuh_50{font-size:.69333rem;font-weight:400;color:#000;line-height:.98667rem;text-align:center}._right_vbtuh_57 path{fill:#01c1b5;stroke:#01c1b5}._wrong_vbtuh_61 path{fill:#f44;stroke:#f44}._notPlay_vbtuh_65 path{fill:#000;stroke:#000}._intonation_wrong_vbtuh_69 path{fill:#ffab25;stroke:#ffab25}._cadence_wrong_vbtuh_73 path{fill:#f44;stroke:#f44}._integrity_wrong_vbtuh_77 path{fill:#cc75ff;stroke:#cc75ff}._headerTop_mou4y_1{display:flex;justify-content:space-between;align-items:center;width:100%;height:100%;flex-shrink:0;padding:.21333rem .26667rem;background-color:#fff}._android_mou4y_11{padding-top:.53333rem}._back_mou4y_14{display:flex;justify-content:center;align-items:center;padding:0 .8rem;height:100%}._back_mou4y_14 img{display:block;width:.4rem;height:.64rem}._disabled_mou4y_26{opacity:0;pointer-events:none}._left_mou4y_30{display:flex;align-items:center}._center_mou4y_34{display:flex;align-items:center;margin:0 auto}._center_mou4y_34 ._cItem_mou4y_39{text-align:center;padding:0 .32rem;white-space:nowrap}._center_mou4y_34 ._cItem_mou4y_39>div:first-child{font-size:.32rem;color:#333;line-height:.37333rem;margin-bottom:.16rem;font-weight:700}._center_mou4y_34 ._cItem_mou4y_39>div:last-child{font-size:.32rem;color:#777;line-height:.32rem;padding:.10667rem .21333rem;border-radius:.37333rem}._center_mou4y_34 ._cItem_mou4y_39:not(:last-child){border-right:.02667rem solid #EBDABF}._center_mou4y_34 ._active_mou4y_61>div:first-child{color:var(--van-primary-color)!important}._center_mou4y_34 ._active_mou4y_61>div:last-child{background-color:#ecf9ff;color:var(--van-primary-color)}._right_mou4y_68{display:flex;align-items:center}._right_mou4y_68 ._btn_mou4y_72{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;font-size:.26667rem;line-height:.37333rem;font-weight:400;padding:0 .16rem;color:#999}._right_mou4y_68 ._btn_mou4y_72 ._iconBtn_mou4y_84{display:block;width:.88rem;height:.88rem}._right_mou4y_68 ._btn_mou4y_72 span{margin-top:.05333rem;white-space:nowrap}._right_mou4y_68 ._btn_mou4y_72 ._btnWrap_mou4y_93{position:relative;width:.66667rem;height:.66667rem}._popup_mou4y_98{--plyr-color-main: var(--van-primary-color)}._popup_mou4y_98 .van-popup__close-icon{top:0;right:-.8rem;background-color:#fff;border-radius:50%;padding:.10667rem;font-size:.42667rem;color:var(--van-primary-color)}._audiobox_mou4y_110{width:40vw}._audiobox_mou4y_110 .plyr{border-radius:.53333rem;width:100%}._videobox_mou4y_117{display:flex;align-items:center;width:80vw;height:80vh}._videobox_mou4y_117 .plyr{border-radius:.26667rem;width:100%;height:100%}._demos_mou4y_128{position:fixed;top:calc(var(--header-height) + .21333rem);right:.53333rem;display:flex;justify-content:flex-end;align-items:center;height:.96rem;padding:0 .37333rem;border-radius:.48rem;background-color:#e2f6f1;z-index:1}._demos_mou4y_128>div{display:flex;align-items:center;margin-right:.16rem}._demos_mou4y_128>div>span{margin-left:.10667rem}._shiyiPopup_mou4y_149{background:#fff;border-radius:.53333rem;width:80vw;max-width:11.2rem;padding:.53333rem}._shiyiTitle_mou4y_156{font-size:.42667rem;color:#333;font-weight:400;text-align:center}._items_mou4y_162{display:flex;flex-wrap:wrap}._items_mou4y_162 ._item_mou4y_162{width:50%;display:flex;align-items:center;padding:.18667rem 0}._items_mou4y_162 ._item_mou4y_162 span{margin-left:.32rem}._items_mou4y_162 ._item_mou4y_162 svg{visibility:visible}\n",document.head.appendChild(A),{setters:[e=>{t=e.d,l=e.j,a=e.a0,n=e.aj,o=e.V,r=e.r,s=e.s,d=e.N,u=e.S,c=e.U,_=e.O,m=e.a5,h=e.az,v=e.A,p=e.F,g=e.G,y=e.aE,f=e.M,b=e.aF,w=e.aG,x=e.aI,F=e.aH,k=e.aJ,I=e.aM,P=e.aN,S=e.aO,N=e.aP,C=e.aD,E=e.aQ,L=e.aT,T=e.aU},e=>{j=e.a,B=e.b},e=>{R=e.P},null,null,null,null],execute:function(){const A={skeleton:"_skeleton_vbtuh_1",detail:"_detail_vbtuh_12",headHeight:"_headHeight_vbtuh_24",headHide:"_headHide_vbtuh_33",container:"_container_vbtuh_36",musicName:"_musicName_vbtuh_50",right:"_right_vbtuh_57",wrong:"_wrong_vbtuh_61",notPlay:"_notPlay_vbtuh_65",intonation_wrong:"_intonation_wrong_vbtuh_69",cadence_wrong:"_cadence_wrong_vbtuh_73",integrity_wrong:"_integrity_wrong_vbtuh_77"},M={headerTop:"_headerTop_mou4y_1",android:"_android_mou4y_11",back:"_back_mou4y_14",disabled:"_disabled_mou4y_26",left:"_left_mou4y_30",center:"_center_mou4y_34",cItem:"_cItem_mou4y_39",active:"_active_mou4y_61",right:"_right_mou4y_68",btn:"_btn_mou4y_72",iconBtn:"_iconBtn_mou4y_84",btnWrap:"_btnWrap_mou4y_93",popup:"_popup_mou4y_98",audiobox:"_audiobox_mou4y_110",videobox:"_videobox_mou4y_117",demos:"_demos_mou4y_128",shiyiPopup:"_shiyiPopup_mou4y_149",shiyiTitle:"_shiyiTitle_mou4y_156",items:"_items_mou4y_162",item:"_item_mou4y_162"},O=""+new URL("icon-back-2cf38e60.svg",i.meta.url).href,H=""+new URL("icon-shiyi-ba387160.svg",i.meta.url).href,U=""+new URL("icon-huifang-4d7bf6f9.svg",i.meta.url).href,z=""+new URL("videobg-2d19d627.png",i.meta.url).href,D=t({name:"NoteSvg",props:{fill:String,shadow:{type:Boolean,defalut:!1},shadowFill:{type:String,default:""},x:{type:Number,default:0},y:{type:Number,default:0}},render(){return l("svg",{width:"14",height:"24",viewBox:"0 0 14 24"},[l("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[l("rect",{x:"0",y:"0",width:"14",height:"24"},null),l("g",{fill:this.fill},[this.shadow&&l("ellipse",{fill:this.shadowFill||this.fill,transform:`translate(4.685927, 18.917813) scale(-1, -1) rotate(-32.000000) translate(${this.x+-4.685927}, ${this.y+-18.917813})`,cx:"4.68592654",cy:"18.9178127",rx:"3.70078457",ry:"2.92022453"},null),l("path",{d:"M1.95251677,0.68258909 C3.68583115,-0.400505943 5.78379192,-0.169765229 6.63844331,1.1979629 C7.4930947,2.56569103 6.78079761,4.55247575 5.04748323,5.63557079 C3.85503595,6.38069455 2.49000663,6.50399819 1.47594704,6.06306368 L1.47635248,22.0768926 L0.0162402201,22.0768926 L0.0154715991,4.11169688 C-0.117424115,2.8976469 0.612367024,1.52000759 1.95251677,0.68258909 Z",transform:"scale(-1, -1) translate(-10, -23) "},null)])])])}}),G=t({name:"header-top",props:{scoreData:{type:Object,default:()=>({})}},setup(e){const i=a(),{scoreData:t}=n(e),p=o({show:!1,shiyiShow:!1,isInitPlyr:!1,_plrl:null}),g={BEGINNER:"入门级",ADVANCED:"进阶级",PERFORMER:"大师级"},y=r("intonation"),f=()=>{h()},b=e=>{y.value=e},w=s((()=>{const e=(t.value.videoFilePath||"").split(".").pop();return"wav"===e||"mp3"===e?"audio":"video"})),x=()=>{p.show=!0,p.isInitPlyr||v((()=>{const e="audio"===w.value?"#audioSrc":"#videoSrc";p._plrl=new R(e,{controls:["play-large","play","progress","current-time"],fullscreen:{enabled:!1}}),p.isInitPlyr=!0}))};return()=>l("div",{class:[M.headerTop,i.android&&M.android]},[l("div",{class:[M.back,!d.isApp&&M.disabled],onClick:f},[l("img",{src:O},null)]),l("div",{class:M.center},[l("div",{class:M.cItem},[l("div",null,[g[t.value.heardLevel]]),l("div",null,[u("难度")])]),l("div",{class:M.cItem},[l("div",null,[t.value.score,u("分")]),l("div",null,[u("评测分数")])]),c.isPercussion?null:l(_,null,[l("div",{onClick:()=>b("intonation"),class:[M.cItem,"intonation"===y.value&&M.active]},[l("div",{style:{color:"rgb(45, 199, 170)"}},[t.value.intonation,u("分")]),l("div",null,[u("音准")])]),l("div",{onClick:()=>b("cadence"),class:[M.cItem,"cadence"===y.value&&M.active]},[l("div",{style:{color:"#FF4E19"}},[t.value.cadence,u("分")]),l("div",null,[u("节奏")])]),l("div",{onClick:()=>b("integrity"),class:[M.cItem,"integrity"===y.value&&M.active]},[l("div",{style:{color:"rgb(255, 196, 89)"}},[t.value.integrity,u("分")]),l("div",null,[u("完成度")])])])]),l("div",{class:M.right},[l("div",{style:{display:t.value.videoFilePath?"":"none"},class:M.btn,onClick:x},[l("img",{class:M.iconBtn,src:U},null),l("span",null,[u("回放")])]),l("div",{class:M.btn,onClick:()=>p.shiyiShow=!0},[l("img",{class:M.iconBtn,src:H},null),l("span",null,[u("释义")])])]),c.isPercussion?null:l("div",{class:M.demos},[l("div",null,[l(D,{fill:"#01C1B5"},null),l("span",null,[u("演奏正确")])]),"intonation"===y.value&&l(_,null,[l("div",null,[l(D,{fill:"rgba(1, 193, 181, .8)",shadowFill:"#FFAB25",shadow:!0,x:-2,y:0},null),l("span",null,[u("音高了")])]),l("div",null,[l(D,{fill:"rgba(1, 193, 181, .8)",shadowFill:"#FFAB25",shadow:!0,x:-1,y:-3},null),l("span",null,[u("音低了")])])]),"cadence"===y.value&&l(_,null,[l("div",null,[l(D,{fill:"rgba(1, 193, 181, .8)",shadowFill:"#FF4444",shadow:!0,x:.5,y:-1},null),l("span",null,[u("节奏过快")])]),l("div",null,[l(D,{fill:"rgba(1, 193, 181, .8)",shadowFill:"#FF4444",shadow:!0,x:-3,y:-2.5},null),l("span",null,[u("节奏慢了")])])]),"integrity"===y.value&&l("div",null,[l(D,{fill:"#CC75FF"},null),l("span",null,[u("完成度不足")])]),l("div",null,[l(D,{fill:"#000"},null),l("span",null,[u("未演奏")])])]),l(m,{teleport:"body",class:["popup-custom","van-scale",M.popup],transition:"van-scale",show:p.show,"onUpdate:show":e=>p.show=e,closeable:!0,onClose:()=>{var e;null===(e=p._plrl)||void 0===e||e.pause()}},{default:()=>["audio"===w.value&&l("div",{class:M.audiobox},[l("audio",{id:"audioSrc",src:t.value.videoFilePath,controls:"false",preload:"metadata",playsinline:!0},null)]),"video"===w.value&&l("div",{class:M.videobox},[l("video",{id:"videoSrc",class:M.videoBox,src:t.value.videoFilePath,"data-poster":z,preload:"metadata",playsinline:!0},null)])]}),l(m,{show:p.shiyiShow,"onUpdate:show":e=>p.shiyiShow=e,class:"popup-custom van-scale center-closeBtn",transition:"van-scale",teleport:"body",closeable:!0},{default:()=>[l("div",{class:M.shiyiPopup},[l("div",{class:M.shiyiTitle},[u("图标释义")]),l("div",{class:M.items},[l("div",{class:M.item},[l(D,{fill:"#01C1B5"},null),l("span",null,[u("绿色音符:演奏正确")])]),l("div",{class:M.item},[l(D,{fill:"#FF4444"},null),l("span",null,[u("红色音符:错音")])]),l("div",{class:M.item},[l(D,{fill:"#CC75FF"},null),l("span",null,[u("紫色音符:完成度不足")])]),l("div",{class:M.item},[l(D,{fill:"#AEAEAE"},null),l("span",null,[u("灰色音符:未演奏")])]),l("div",{class:M.item},[l(D,{fill:"rgba(1, 193, 181, .8)",shadowFill:"#FF4444",shadow:!0,x:.5,y:-1},null),l("span",null,[u("音符重影(红色在前):节奏过快")])]),l("div",{class:M.item},[l(D,{fill:"rgba(1, 193, 181, .8)",shadowFill:"#FF4444",shadow:!0,x:-3,y:-2.5},null),l("span",null,[u("音符重影(红色在后):节奏慢了")])]),l("div",{class:M.item},[l(D,{fill:"rgba(1, 193, 181, .8)",shadowFill:"#FFAB25",shadow:!0,x:-2,y:0},null),l("span",null,[u("音符重影(黄色在上):音高了")])]),l("div",{class:M.item},[l(D,{fill:"rgba(1, 193, 181, .8)",shadowFill:"#FFAB25",shadow:!0,x:-1,y:-3},null),l("span",null,[u("音符重影(黄色在下):音低了")])])])])]})])}}),J={RIGHT:A.right,WRONG:A.wrong,NOT_PLAY:A.notPlay,CADENCE_WRONG:A.cadence_wrong,INTONATION_WRONG:A.intonation_wrong,INTEGRITY_WRONG:A.integrity_wrong};e("default",t({name:"music-list",setup(){const e=p(),i=o({videoFilePath:"",cadence:0,integrity:0,intonation:0,score:0,heardLevel:""}),t=o({isLoading:!0,paddingLeft:"",headerHide:!1,musicalNotesPlayStats:[],userMeasureScore:{}});g((()=>{(async()=>{const e=await I();if(null!=e&&e.content){const{isSpecialShapedScreen:i,notchHeight:l}=e.content;i&&(t.paddingLeft="25px")}t.paddingLeft="20px"})(),y()}));const a=(e,i)=>{if(c.scrollContainer="scrollContainer",c.detailId=e.id,c.xmlUrl=e.xmlFileUrl,c.partIndex=i,c.subjectId=e.musicSubject,c.categoriesId=e.categoriesId,c.categoriesName=e.musicTagNames,c.enableEvaluation=!!e.canEvaluate,c.examSongId=e.id+"",c.examSongName=e.musicSheetName,e.extConfigJson)try{c.extConfigJson=JSON.parse(e.extConfigJson)}catch(t){console.error("解析扩展字段错误:",t)}c.isOpenMetronome="MP3_METRONOME"===e.mp3Type,c.needTick=e.isOpenMetronome,c.isShowFingering=!!e.showFingering,c.music=e.audioFileUrl,c.accompany=e.metronomeUrl||e.metronomeUrl,c.midiUrl=e.midiUrl,c.parentCategoriesId=e.musicTag,c.playMode="MP3"===e.audioType?"MP3":"MIDI",c.originSpeed=c.speed=e.speed,c.track=e.track,c.enableNotation=!!e.notation,c.subjectId=P(c.subjectId,"ORCHESTRA"),c.isPercussion=23==c.subjectId||113==c.subjectId||121==c.subjectId||S(),c.fingeringInfo=N(c.subjectId)},n=()=>{c.extConfigJson.multitrack&&C("multitrack",c.extConfigJson.multitrack)};f((async()=>{var l,o,r,s,d,u,_,m,h,v;const p=await j(e.id);c.partIndex=Number(null==p||null===(l=p.data)||void 0===l?void 0:l.partIndex);let g={};try{var y;g=JSON.parse(null==p||null===(y=p.data)||void 0===y?void 0:y.scoreData)}catch(f){console.error("解析评测结果:",f)}t.musicalNotesPlayStats=(null===(o=g.musicalNotesPlayStats)||void 0===o?void 0:o.notesData)||[],t.userMeasureScore=g.userMeasureScore||{},i.heardLevel=null===(r=p.data)||void 0===r?void 0:r.heardLevel,i.cadence=null===(s=p.data)||void 0===s?void 0:s.cadence,i.integrity=null===(d=p.data)||void 0===d?void 0:d.integrity,i.intonation=null===(u=p.data)||void 0===u?void 0:u.intonation,i.score=null===(_=p.data)||void 0===_?void 0:_.score,i.videoFilePath=(null===(m=p.data)||void 0===m?void 0:m.videoFilePath)||(null===(h=p.data)||void 0===h?void 0:h.recordFilePath),Promise.all([B(null===(v=g.musicalNotesPlayStats)||void 0===v?void 0:v.examSongId)]).then((e=>{(e=>{const i=c.partIndex,l={...e.data,...e.data.background[i]};a(l,i),n(),t.isLoading=!1})(e[0])}))}));const r=e=>{c.musicRendered=!0,c.osmd=e,c.times=E(e),console.log("🚀 ~ state.times:",c.times),(()=>{for(const e of t.musicalNotesPlayStats){const i=c.times[e.musicalNotesIndex],t=document.getElementById("vf-"+i.id);null==t||t.classList.add(J[e.musicalErrorType])}})(),(()=>{for(let e in t.userMeasureScore)T(t.userMeasureScore[e],!1)})(),L()};return f((()=>{window.addEventListener("resize",b)})),w((()=>{window.removeEventListener("resize",b)})),()=>l("div",{class:[A.detail,c.setting.eyeProtection&&"eyeProtection",A.shareBox],style:{paddingLeft:t.paddingLeft}},[l(x,{name:"van-fade"},{default:()=>[!c.musicRendered&&l("div",{class:A.skeleton},[l(F,{class:A.skeleton,row:8},null)])]}),l("div",{class:[A.headHeight,t.headerHide&&A.headHide],onClick:e=>e.stopPropagation()},[l(x,{name:"van-slide-down"},{default:()=>[c.musicRendered&&l(G,{scoreData:i},null)]})]),l("div",{id:"scrollContainer",class:[A.container,!c.setting.displayCursor&&"hideCursor"]},[l("div",{class:A.musicName},[c.examSongName]),!t.isLoading&&l(k,{onRendered:r},null)])])}}))}}}));
|