1 |
- System.register(["./index-legacy-e28491f2.js","./instrument-legacy-5cc83ac2.js","./plyr.min-legacy-2197a4aa.js","./vue3-lottie.es-legacy-58ef7c18.js","./index-legacy-617daedb.js","./instruments-legacy-43178158.js","./index-legacy-1ce1819d.js"],(function(e,i){"use strict";var n,l,t,a,o,r,s,d,c,_,u,y,v,h,m,f,p,g,w,b,z,x,F,k,I,P,S,C,N,q,E,L,T,B,R=document.createElement("style");return R.textContent="::-webkit-scrollbar{display:none}._detail_9q9uv_5{overflow:auto;margin-right:-.45333rem;height:100vh}._skeleton_9q9uv_11{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_9q9uv_5{width:100vw;min-height:100vh;--header-height: 1.65333rem;background:#f8f2e8}._detail_9q9uv_5 #cursorImg-0{display:none!important}._detail_9q9uv_5 #selectionBox{pointer-events:none}._detail_9q9uv_5 ._headHeight_9q9uv_34{position:fixed;left:0;top:0;width:100%;height:var(--header-height);transition:margin .3s;z-index:10}._detail_9q9uv_5 ._headHeight_9q9uv_34._headHide_9q9uv_43{margin-top:calc(0Px - var(--header-height))}._detail_9q9uv_5 ._container_9q9uv_46{position:relative;margin:0 .26667rem;border-radius:.26667rem;padding-top:calc(var(--header-height) + 1.44rem)}._detail_9q9uv_5 ._container_9q9uv_46 #musicAndSelection{overflow:initial;height:initial;max-height:initial}._detail_9q9uv_5 ._container_9q9uv_46 #musicAndSelection>#osmdCanvasPage1{position:relative!important}._musicName_9q9uv_60{font-size:.69333rem;font-weight:400;color:#000;line-height:.98667rem;text-align:center}._right_9q9uv_67 path{fill:#01c1b5;stroke:#01c1b5}._wrong_9q9uv_71 path{fill:#f44;stroke:#f44}._notPlay_9q9uv_75 path{fill:#000;stroke:#000}._intonation_wrong_9q9uv_79 path{fill:#ffab25;stroke:#ffab25}._cadence_wrong_9q9uv_83 path{fill:#f44;stroke:#f44}._integrity_wrong_9q9uv_87 path{fill:#cc75ff;stroke:#cc75ff}._headerTop_yzfyn_1{display:flex;justify-content:space-between;align-items:center;width:100%;height:100%;flex-shrink:0;padding:.21333rem .26667rem;background-color:#fff}._android_yzfyn_11{padding-top:.53333rem}._back_yzfyn_14{display:flex;justify-content:center;align-items:center;padding:0 .8rem;height:100%}._back_yzfyn_14 img{display:block;width:.4rem;height:.64rem}._disabled_yzfyn_26{opacity:0;pointer-events:none}._left_yzfyn_30{display:flex;align-items:center}._center_yzfyn_34{display:flex;align-items:center;margin:0 auto}._center_yzfyn_34 ._cItem_yzfyn_39{text-align:center;padding:0 .32rem;white-space:nowrap}._center_yzfyn_34 ._cItem_yzfyn_39>div:first-child{font-size:.32rem;color:#333;line-height:.37333rem;margin-bottom:.16rem;font-weight:700}._center_yzfyn_34 ._cItem_yzfyn_39>div:last-child{font-size:.32rem;color:#777;line-height:.32rem;padding:.10667rem .21333rem;border-radius:.37333rem}._center_yzfyn_34 ._cItem_yzfyn_39:not(:last-child){border-right:.02667rem solid #EBDABF}._center_yzfyn_34 ._active_yzfyn_61>div:first-child{color:var(--van-primary-color)!important}._center_yzfyn_34 ._active_yzfyn_61>div:last-child{background-color:#ecf9ff;color:var(--van-primary-color)}._right_yzfyn_68{display:flex;align-items:center}._right_yzfyn_68 ._btn_yzfyn_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_yzfyn_68 ._btn_yzfyn_72 ._iconBtn_yzfyn_84{display:block;width:.88rem;height:.88rem}._right_yzfyn_68 ._btn_yzfyn_72 span{margin-top:.05333rem;white-space:nowrap}._right_yzfyn_68 ._btn_yzfyn_72 ._btnWrap_yzfyn_93{position:relative;width:.66667rem;height:.66667rem}._popup_yzfyn_98{--plyr-color-main: var(--van-primary-color)}._popup_yzfyn_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_yzfyn_110{width:40vw}._audiobox_yzfyn_110 .plyr{border-radius:.53333rem;width:100%}._videobox_yzfyn_117{display:flex;align-items:center;width:80vw;height:80vh}._videobox_yzfyn_117 .plyr{border-radius:.26667rem;width:100%;height:100%}._demos_yzfyn_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:rgba(255,255,255,.9);z-index:1}._demos_yzfyn_128>div{display:flex;align-items:center;margin-right:.16rem}._demos_yzfyn_128>div>span{margin-left:.10667rem}._shiyiPopup_yzfyn_149{background:#fff;border-radius:.53333rem;width:80vw;max-width:11.2rem;padding:.53333rem}._shiyiTitle_yzfyn_156{font-size:.42667rem;color:#333;font-weight:400;text-align:center}._items_yzfyn_162{display:flex;flex-wrap:wrap}._items_yzfyn_162 ._item_yzfyn_162{width:50%;display:flex;align-items:center;padding:.18667rem 0}._items_yzfyn_162 ._item_yzfyn_162 span{margin-left:.32rem}._items_yzfyn_162 ._item_yzfyn_162 svg{visibility:visible}\n",document.head.appendChild(R),{setters:[e=>{n=e.d,l=e.f,t=e.v,a=e.U,o=e.n,r=e.l,s=e.e,d=e.h,c=e.k,_=e.m,u=e.F,y=e.P,v=e.a8,h=e.as,m=e.g,f=e.o,p=e.ad,g=e.c,w=e.ae,b=e.af,z=e.ah,x=e.ag,F=e.ai,k=e.al,I=e.am,P=e.an,S=e.ao,C=e.ac,N=e.ap,q=e.at,E=e.au},e=>{L=e.a,T=e.s},e=>{B=e.P},null,null,null,null],execute:function(){const R={detail:"_detail_9q9uv_5",skeleton:"_skeleton_9q9uv_11",headHeight:"_headHeight_9q9uv_34",headHide:"_headHide_9q9uv_43",container:"_container_9q9uv_46",musicName:"_musicName_9q9uv_60",right:"_right_9q9uv_67",wrong:"_wrong_9q9uv_71",notPlay:"_notPlay_9q9uv_75",intonation_wrong:"_intonation_wrong_9q9uv_79",cadence_wrong:"_cadence_wrong_9q9uv_83",integrity_wrong:"_integrity_wrong_9q9uv_87"},j={headerTop:"_headerTop_yzfyn_1",android:"_android_yzfyn_11",back:"_back_yzfyn_14",disabled:"_disabled_yzfyn_26",left:"_left_yzfyn_30",center:"_center_yzfyn_34",cItem:"_cItem_yzfyn_39",active:"_active_yzfyn_61",right:"_right_yzfyn_68",btn:"_btn_yzfyn_72",iconBtn:"_iconBtn_yzfyn_84",btnWrap:"_btnWrap_yzfyn_93",popup:"_popup_yzfyn_98",audiobox:"_audiobox_yzfyn_110",videobox:"_videobox_yzfyn_117",demos:"_demos_yzfyn_128",shiyiPopup:"_shiyiPopup_yzfyn_149",shiyiTitle:"_shiyiTitle_yzfyn_156",items:"_items_yzfyn_162",item:"_item_yzfyn_162"},A=""+new URL("icon-back-2cf38e60.svg",i.meta.url).href,M=""+new URL("icon-shiyi-ba387160.svg",i.meta.url).href,O=""+new URL("icon-huifang-4d7bf6f9.svg",i.meta.url).href,H=""+new URL("videobg-2d19d627.png",i.meta.url).href,U=n({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)])])])}}),D=n({name:"header-top",props:{scoreData:{type:Object,default:()=>({})}},setup(e){const i=t(),{scoreData:n}=a(e),m=o({show:!1,shiyiShow:!1,isInitPlyr:!1,_plrl:null}),f={BEGINNER:"入门级",ADVANCED:"进阶级",PERFORMER:"大师级"},p=r("intonation"),g=()=>{v()},w=e=>{p.value=e},b=s((()=>{const e=(n.value.videoFilePath||"").split(".").pop();return"wav"===e||"mp3"===e||"m4a"===e?"audio":"video"})),z=()=>{m.show=!0,m.isInitPlyr||h((()=>{const e="audio"===b.value?"#audioSrc":"#videoSrc";m._plrl=new B(e,{controls:["play-large","play","progress","current-time"],fullscreen:{enabled:!1}}),m.isInitPlyr=!0}))};return()=>l("div",{class:[j.headerTop,i.android&&j.android]},[l("div",{class:[j.back,!d.isApp&&j.disabled],onClick:g},[l("img",{src:A},null)]),l("div",{class:j.center},[l("div",{class:j.cItem},[l("div",null,[f[n.value.heardLevel]]),l("div",null,[c("难度")])]),l("div",{class:j.cItem},[l("div",null,[n.value.score,c("分")]),l("div",null,[c("评测分数")])]),_.isPercussion?null:l(u,null,[l("div",{onClick:()=>w("intonation"),class:[j.cItem,"intonation"===p.value&&j.active]},[l("div",{style:{color:"rgb(45, 199, 170)"}},[n.value.intonation,c("分")]),l("div",null,[c("音准")])]),l("div",{onClick:()=>w("cadence"),class:[j.cItem,"cadence"===p.value&&j.active]},[l("div",{style:{color:"#FF4E19"}},[n.value.cadence,c("分")]),l("div",null,[c("节奏")])]),l("div",{onClick:()=>w("integrity"),class:[j.cItem,"integrity"===p.value&&j.active]},[l("div",{style:{color:"rgb(255, 196, 89)"}},[n.value.integrity,c("分")]),l("div",null,[c("完成度")])])])]),l("div",{class:j.right},[l("div",{style:{display:n.value.videoFilePath?"":"none"},class:j.btn,onClick:z},[l("img",{class:j.iconBtn,src:O},null),l("span",null,[c("回放")])]),l("div",{class:j.btn,onClick:()=>m.shiyiShow=!0},[l("img",{class:j.iconBtn,src:M},null),l("span",null,[c("释义")])])]),_.isPercussion?null:l("div",{class:j.demos},[l("div",null,[l(U,{fill:"#01C1B5"},null),l("span",null,[c("演奏正确")])]),"intonation"===p.value&&l(u,null,[l("div",null,[l(U,{fill:"rgba(1, 193, 181, .8)",shadowFill:"#FFAB25",shadow:!0,x:-2,y:0},null),l("span",null,[c("音高了")])]),l("div",null,[l(U,{fill:"rgba(1, 193, 181, .8)",shadowFill:"#FFAB25",shadow:!0,x:-1,y:-3},null),l("span",null,[c("音低了")])])]),"cadence"===p.value&&l(u,null,[l("div",null,[l(U,{fill:"rgba(1, 193, 181, .8)",shadowFill:"#FF4444",shadow:!0,x:.5,y:-1},null),l("span",null,[c("节奏过快")])]),l("div",null,[l(U,{fill:"rgba(1, 193, 181, .8)",shadowFill:"#FF4444",shadow:!0,x:-3,y:-2.5},null),l("span",null,[c("节奏慢了")])])]),"integrity"===p.value&&l("div",null,[l(U,{fill:"#CC75FF"},null),l("span",null,[c("完成度不足")])]),l("div",null,[l(U,{fill:"#000"},null),l("span",null,[c("未演奏")])])]),l(y,{teleport:"body",class:["popup-custom","van-scale",j.popup],transition:"van-scale",show:m.show,"onUpdate:show":e=>m.show=e,closeable:!0,onClose:()=>{var e;null===(e=m._plrl)||void 0===e||e.pause()}},{default:()=>["audio"===b.value&&l("div",{class:j.audiobox},[l("audio",{id:"audioSrc",src:n.value.videoFilePath,controls:"false",preload:"metadata",playsinline:!0},null)]),"video"===b.value&&l("div",{class:j.videobox},[l("video",{id:"videoSrc",class:j.videoBox,src:n.value.videoFilePath,"data-poster":H,preload:"metadata",playsinline:!0},null)])]}),l(y,{show:m.shiyiShow,"onUpdate:show":e=>m.shiyiShow=e,class:"popup-custom van-scale center-closeBtn",transition:"van-scale",teleport:"body",closeable:!0},{default:()=>[l("div",{class:j.shiyiPopup},[l("div",{class:j.shiyiTitle},[c("图标释义")]),l("div",{class:j.items},[l("div",{class:j.item},[l(U,{fill:"#01C1B5"},null),l("span",null,[c("绿色音符:演奏正确")])]),l("div",{class:j.item},[l(U,{fill:"#FF4444"},null),l("span",null,[c("红色音符:错音")])]),l("div",{class:j.item},[l(U,{fill:"#CC75FF"},null),l("span",null,[c("紫色音符:完成度不足")])]),l("div",{class:j.item},[l(U,{fill:"#AEAEAE"},null),l("span",null,[c("灰色音符:未演奏")])]),l("div",{class:j.item},[l(U,{fill:"rgba(1, 193, 181, .8)",shadowFill:"#FF4444",shadow:!0,x:.5,y:-1},null),l("span",null,[c("音符重影(红色在前):节奏过快")])]),l("div",{class:j.item},[l(U,{fill:"rgba(1, 193, 181, .8)",shadowFill:"#FF4444",shadow:!0,x:-3,y:-2.5},null),l("span",null,[c("音符重影(红色在后):节奏慢了")])]),l("div",{class:j.item},[l(U,{fill:"rgba(1, 193, 181, .8)",shadowFill:"#FFAB25",shadow:!0,x:-2,y:0},null),l("span",null,[c("音符重影(黄色在上):音高了")])]),l("div",{class:j.item},[l(U,{fill:"rgba(1, 193, 181, .8)",shadowFill:"#FFAB25",shadow:!0,x:-1,y:-3},null),l("span",null,[c("音符重影(黄色在下):音低了")])])])])]})])}}),G={RIGHT:R.right,WRONG:R.wrong,NOT_PLAY:R.notPlay,CADENCE_WRONG:R.cadence_wrong,INTONATION_WRONG:R.intonation_wrong,INTEGRITY_WRONG:R.integrity_wrong};e("default",n({name:"music-list",setup(){const e=m(),i=o({videoFilePath:"",cadence:0,integrity:0,intonation:0,score:0,heardLevel:""}),n=o({isLoading:!0,paddingLeft:"",headerHide:!1,musicalNotesPlayStats:[],userMeasureScore:{}});f((()=>{"webTeacher"!==m().platform&&(async()=>{const e=await k();if(null!=e&&e.content){const{isSpecialShapedScreen:i,notchHeight:l}=e.content;i&&(n.paddingLeft="25px")}n.paddingLeft="20px"})(),p()}));const t=(e,i)=>{if(_.scrollContainer="scrollContainer",_.detailId=e.id,_.xmlUrl=e.xmlFileUrl,_.partIndex=i,_.subjectId=e.musicSubject,_.categoriesId=e.categoriesId,_.categoriesName=e.musicTagNames,_.enableEvaluation=!!e.canEvaluate,_.examSongId=e.id+"",_.examSongName=e.musicSheetName,e.extConfigJson)try{_.extConfigJson=JSON.parse(e.extConfigJson)}catch(n){console.error("解析扩展字段错误:",n)}_.isOpenMetronome="MP3_METRONOME"===e.mp3Type,_.needTick=e.isOpenMetronome,_.isShowFingering=!!e.showFingering,_.music=e.audioFileUrl,_.accompany=e.metronomeUrl||e.metronomeUrl,_.midiUrl=e.midiUrl,_.parentCategoriesId=e.musicTag,_.playMode="MP3"===e.audioType?"MP3":"MIDI",_.originSpeed=_.speed=e.speed,_.track=e.track,_.enableNotation=!!e.notation,_.subjectId=I(_.subjectId,"ORCHESTRA"),_.isPercussion=23==_.subjectId||113==_.subjectId||121==_.subjectId||P(),_.fingeringInfo=S(_.subjectId)},a=()=>{_.extConfigJson.multitrack&&C("multitrack",_.extConfigJson.multitrack)};g((async()=>{var l,o,r,s,d,c,u,y,v,h;const m=await L(e.id);_.partIndex=Number(null==m||null===(l=m.data)||void 0===l?void 0:l.partIndex);let f={};try{var p;f=JSON.parse(null==m||null===(p=m.data)||void 0===p?void 0:p.scoreData)}catch(g){console.error("解析评测结果:",g)}n.musicalNotesPlayStats=(null===(o=f.musicalNotesPlayStats)||void 0===o?void 0:o.notesData)||[],n.userMeasureScore=f.userMeasureScore||{},i.heardLevel=null===(r=m.data)||void 0===r?void 0:r.heardLevel,i.cadence=null===(s=m.data)||void 0===s?void 0:s.cadence,i.integrity=null===(d=m.data)||void 0===d?void 0:d.integrity,i.intonation=null===(c=m.data)||void 0===c?void 0:c.intonation,i.score=null===(u=m.data)||void 0===u?void 0:u.score,i.videoFilePath=(null===(y=m.data)||void 0===y?void 0:y.videoFilePath)||(null===(v=m.data)||void 0===v?void 0:v.recordFilePath),Promise.all([T(null===(h=f.musicalNotesPlayStats)||void 0===h?void 0:h.examSongId)]).then((e=>{(e=>{const i=_.partIndex,l={...e.data,...e.data.background[i]};t(l,i),a(),n.isLoading=!1})(e[0])}))}));const r=e=>{_.musicRendered=!0,_.osmd=e,_.times=N(e),console.log("🚀 ~ state.times:",_.times),(()=>{for(const e of n.musicalNotesPlayStats){const i=_.times[e.musicalNotesIndex],n=null!=i&&i.id?document.getElementById("vf-"+(null==i?void 0:i.id)):null;null==n||n.classList.add(G[e.musicalErrorType])}})(),(()=>{for(let e in n.userMeasureScore)E(n.userMeasureScore[e],!1)})(),q()};return g((()=>{window.addEventListener("resize",w)})),b((()=>{window.removeEventListener("resize",w)})),()=>l("div",{class:[R.detail,_.setting.eyeProtection&&"eyeProtection",R.shareBox],style:{paddingLeft:n.paddingLeft}},[l(z,{name:"van-fade"},{default:()=>[!_.musicRendered&&l("div",{class:R.skeleton},[l(x,{class:R.skeleton,row:8},null)])]}),l("div",{class:[R.headHeight,n.headerHide&&R.headHide],onClick:e=>e.stopPropagation()},[l(z,{name:"van-slide-down"},{default:()=>[_.musicRendered&&l(D,{scoreData:i},null)]})]),l("div",{id:"scrollContainer",class:[R.container,!_.setting.displayCursor&&"hideCursor"]},[l("div",{class:R.musicName},[_.examSongName]),!n.isLoading&&l(F,{onRendered:r},null)])])}}))}}}));
|