1 |
- import{r as A,d as y,g as F,o as N,s as x,a$ as D,a as U,c as b,e as M,f as P,h as e,T as L,R as q,F as I,i as H,j as Q,N as J,a1 as O,n as B,l as j,m as n,k as r,D as G,al as K,aG as V,ar as W,at as z,au as Y,av as X,az as Z,aA as $,aB as ee,aC as te,aq as ne,aD as oe,aH as se,aI as ae,aJ as ie,aK as le,aL as re,aM as ce,aN as ue}from"./index-740d866a.js";import{P as de}from"./plyr.min-c8c2777b.js";function st(){import.meta.url,import("_").catch(()=>1);async function*a(){}}const pe=async()=>await A.get("/user/getUserInfo"),me=()=>A.get("/user/getUserInfo"),ge=()=>A.get("/user/getUserInfo"),ve=a=>A.get("/musicSheet/detail/"+a),fe=a=>A.get("/musicPracticeRecord/getLastEvaluationMusicalNotesPlayStats",{params:{recordId:a}}),he=y({name:"App",setup(){const a=F(),l=async()=>P.platformType==="WEB"?await ge():P.platformType==="TEACHER"?await me():await pe(),o=async()=>{const i=await l(),u=(i==null?void 0:i.data)||{};H(u)};N(async()=>{if(a.Authorization)x(a.Authorization);else{const i=await D({api:"getToken"}),u=i==null?void 0:i.content;u!=null&&u.accessToken&&x(u.tokenType+" "+u.accessToken),console.log(u.tokenType+" "+u.accessToken)}o(),U(Q())}),b(()=>{const i=document.getElementById("loading");i&&document.body.removeChild(i)});const g=M(()=>P.status==="login");return()=>e(I,null,[P.status==="error"?e(L,null,null):g.value?e(q,null,null):null])}}),Ae="_skeleton_1lq3l_1",ye="_detail_1lq3l_12",_e="_headHeight_1lq3l_19",Pe="_headHide_1lq3l_28",Ce="_container_1lq3l_31",Ee="_shareBox_1lq3l_47",Be="_demos_1lq3l_56",Ie="_right_1lq3l_76",we="_wrong_1lq3l_80",Re="_notPlay_1lq3l_84",Te="_cadence_wrong_1lq3l_88",Se="_intonation_wrong_1lq3l_92",ke="_integrity_wrong_1lq3l_96",c={skeleton:Ae,detail:ye,headHeight:_e,headHide:Pe,container:Ce,shareBox:Ee,demos:Be,right:Ie,wrong:we,notPlay:Re,cadence_wrong:Te,intonation_wrong:Se,integrity_wrong:ke},xe="_headerTop_1m5my_1",Fe="_back_1m5my_11",Ne="_left_1m5my_22",be="_center_1m5my_26",Me="_cItem_1m5my_30",De="_active_1m5my_52",Ue="_right_1m5my_55",Le="_btn_1m5my_59",qe="_iconBtn_1m5my_70",He="_btnWrap_1m5my_78",Qe="_popup_1m5my_83",Je="_audiobox_1m5my_95",Oe="_videobox_1m5my_102",s={headerTop:xe,back:Fe,left:Ne,center:be,cItem:Me,active:De,right:Ue,btn:Le,iconBtn:qe,btnWrap:He,popup:Qe,audiobox:Je,videobox:Oe},je="_container_1g67n_1",Ge="_noticeBar_1g67n_10",Ke="_icon_1g67n_14",Ve="_status_1g67n_19",E={container:je,noticeBar:Ge,icon:Ke,status:Ve},We=""+new URL("../svg/arrow-7d6e3644.svg",import.meta.url).href,ze=y({name:"detail-title",props:{text:{type:String,default:""},rightView:{type:Boolean,default:!0},onClick:{type:Function}},render(){return e("div",{class:E.container},[e(J,{text:this.text,color:"#000",class:E.noticeBar,background:"none"},null),this.rightView?e("img",{class:E.status,src:We},null):null])}}),Ye=""+new URL("../png/icon-back-a96b2fe2.png",import.meta.url).href,Xe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAMAAADUivDaAAABpFBMVEUAAABlq/+Fu/+JvP9JnP+Cuf+JvP9Jnf9fqP9Hnf96tv9ep/9JnP+BuP9Sof9prP+BuP9Rof+AuP9RoP92tP9cpv9prf9Knf+AuP9RoP+AuP9SoP9prf9TpP+Kuv9Rof9qtf9vr/9orP9gqf+Jvf9ysf+IvP90sv+Kvf9HnP9iqf92tP9bpf9Sov9PoP95tf9YpP9Mnv+Kvf9lqv9Im/+Euv99t/9On/+Jvf9gqf+Jvf92s/9cpv+LvP9JnP+JvP94tf9xsf+Vv/9AoP9Jkv9jqv9trv9rrf9Wo/9Uov9zsf9xsf+Jwv////9hqP9zsf9jqf9vr/9xsP9trv9Tof94tP9rrf9prP9+t/9lqv+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,$e=y({name:"header-top",props:{scoreData:{type:Object,default:()=>({})}},setup(a){const{scoreData:l}=O(a),o=B({show:!1,isInitPlyr:!1,_plrl:null}),g={BEGINNER:"入门级",ADVANCED:"进阶级",PERFORMER:"大师级"},i=j("intonation"),u=()=>{K()},v=d=>{},f=M(()=>{const d=(l.value.videoFilePath||"").split(".").pop();return d==="wav"||d==="mp3"?"audio":"video"}),C=()=>{o.show=!0,!o.isInitPlyr&&V(()=>{const d=f.value==="audio"?"#audioSrc":"#videoSrc";o._plrl=new de(d,{controls:["play-large","play","progress","current-time"],fullscreen:{enabled:!1}}),o.isInitPlyr=!0})};return()=>e("div",{class:s.headerTop},[e("div",{class:s.left},[e("div",{class:s.back,onClick:u},[e("img",{src:Ye},null)]),e(ze,{text:n.examSongName,rightView:!1},null)]),e("div",{class:s.center},[e("div",{class:s.cItem},[e("div",null,[g[l.value.heardLevel]]),e("div",null,[r("难度")])]),e("div",{class:s.cItem},[e("div",null,[l.value.score,r("分")]),e("div",null,[r("评测分数")])]),n.isPercussion?null:e(I,null,[e("div",{onClick:()=>v(),class:[s.cItem,i.value==="intonation"&&s.active]},[e("div",null,[l.value.intonation,r("分")]),e("div",null,[r("音准")])]),e("div",{onClick:()=>v(),class:[s.cItem,i.value==="cadence"&&s.active]},[e("div",{style:{color:"#FF4E19"}},[l.value.cadence,r("分")]),e("div",null,[r("节奏")])]),e("div",{onClick:()=>v(),class:[s.cItem,i.value==="integrity"&&s.active]},[e("div",{style:{color:"#4EA1FF"}},[l.value.integrity,r("分")]),e("div",null,[r("完成度")])])])]),e("div",{class:s.right},[e("div",{style:{display:l.value.videoFilePath?"":"none"},class:s.btn,onClick:C},[e("img",{class:s.iconBtn,src:Xe},null),e("span",null,[r("回放")])])]),e(G,{teleport:"body",class:["popup-custom","van-scale",s.popup],transition:"van-scale",show:o.show,"onUpdate:show":d=>o.show=d,closeable:!0,onClose:()=>{var d;(d=o._plrl)==null||d.pause()}},{default:()=>[f.value==="audio"&&e("div",{class:s.audiobox},[e("audio",{id:"audioSrc",src:l.value.videoFilePath,controls:"false",preload:"metadata",playsinline:!0},null)]),f.value==="video"&&e("div",{class:s.videobox},[e("video",{id:"videoSrc",class:s.videoBox,src:l.value.videoFilePath,"data-poster":Ze,preload:"metadata",playsinline:!0},null)])]})])}}),h=y({name:"NoteSvg",props:{fill:String},render(){return e("svg",{width:"7px",height:"23px",viewBox:"0 0 7 23",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[e("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e("g",{transform:"translate(-55.000000, -24.000000)"},[e("g",{transform:"translate(55.000000, 24.000000)",fill:this.fill},[e("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",id:"形状结合",transform:"translate(3.500000, 11.038446) scale(-1, -1) translate(-3.500000, -11.038446) "},null)])])])])}}),et={RIGHT:c.right,WRONG:c.wrong,NOT_PLAY:c.notPlay,CADENCE_WRONG:c.cadence_wrong,INTONATION_WRONG:c.intonation_wrong,INTEGRITY_WRONG:c.integrity_wrong},tt=y({name:"music-list",setup(){const a=F(),l=B({videoFilePath:"",cadence:0,integrity:0,intonation:0,score:0,heardLevel:""}),o=B({isLoading:!0,paddingLeft:"",headerHide:!1,musicalNotesPlayStats:[],userMeasureScore:{}}),g=async()=>{const t=await Z();if(t!=null&&t.content){const{isSpecialShapedScreen:p,notchHeight:m}=t.content;p&&(o.paddingLeft="25px")}o.paddingLeft="20px"};N(()=>{g(),W()});const i=t=>{const p=n.partIndex,m={...t.data,...t.data.background[p]};u(m,p),v(),o.isLoading=!1},u=(t,p)=>{if(n.scrollContainer="scrollContainer",n.detailId=t.id,n.xmlUrl=t.xmlFileUrl,n.partIndex=p,n.subjectId=t.musicSubject,n.categoriesId=t.categoriesId,n.categoriesName=t.musicTagNames,n.enableEvaluation=!!t.canEvaluate,n.examSongId=t.id+"",n.examSongName=t.musicSheetName,t.extConfigJson)try{n.extConfigJson=JSON.parse(t.extConfigJson)}catch(m){console.error("解析扩展字段错误:",m)}n.isOpenMetronome=t.mp3Type==="MP3_METRONOME",n.needTick=t.isOpenMetronome,n.isShowFingering=!!t.showFingering,n.music=t.audioFileUrl,n.accompany=t.metronomeUrl||t.metronomeUrl,n.midiUrl=t.midiUrl,n.parentCategoriesId=t.musicTag,n.playMode=t.audioType==="MP3"?"MP3":"MIDI",n.originSpeed=n.speed=t.speed,n.track=t.track,n.enableNotation=!!t.notation,n.subjectId=$(n.subjectId,"ORCHESTRA"),n.isPercussion=n.subjectId==23||n.subjectId==113||n.subjectId==121||ee(),n.fingeringInfo=te(n.subjectId)},v=()=>{n.extConfigJson.multitrack&&ne("multitrack",n.extConfigJson.multitrack)};b(async()=>{var p,m,w,R,T,S,k;window.appName="colexiu";const t=await fe(a.id);n.partIndex=Number((p=t==null?void 0:t.data)==null?void 0:p.partIndex),o.musicalNotesPlayStats=((w=(m=t==null?void 0:t.data)==null?void 0:m.musicalNotesPlayStats)==null?void 0:w.notesData)||[],o.userMeasureScore=((R=t==null?void 0:t.data)==null?void 0:R.userMeasureScore)||{};for(let _ in l)l[_]=(T=t==null?void 0:t.data)==null?void 0:T[_];Promise.all([ve((k=(S=t==null?void 0:t.data)==null?void 0:S.musicalNotesPlayStats)==null?void 0:k.examSongId)]).then(_=>{i(_[0])})});const f=()=>{for(const t of o.musicalNotesPlayStats){const p=n.times[t.musicalNotesIndex],m=document.getElementById("vf-"+p.id);m==null||m.classList.add(et[t.musicalErrorType])}},C=()=>{for(let t in o.userMeasureScore)ae(o.userMeasureScore[t],!1)},d=t=>{n.musicRendered=!0,n.osmd=t,n.times=oe(t),console.log("🚀 ~ state.times:",n.times),f(),C(),se()};return()=>e("div",{class:[c.shareBox,c.detail,n.setting.eyeProtection&&"eyeProtection"],style:{paddingLeft:o.paddingLeft}},[!n.musicRendered&&e("div",{class:c.skeleton},[e(z,{class:c.skeleton,row:8},null)]),e("div",{class:[c.headHeight,o.headerHide&&c.headHide],onClick:t=>t.stopPropagation()},[e(Y,{name:"van-slide-down"},{default:()=>[n.musicRendered&&e($e,{scoreData:l},null)]})]),e("div",{id:"scrollContainer",class:[c.container,!n.setting.displayCursor&&"hideCursor"]},[e("div",{class:c.demos},[e("div",null,[e(h,{fill:"#01C1B5"},null),e("span",null,[r("演奏正确")])]),e("div",null,[e(h,{fill:"#067DD7"},null),e("span",null,[r("节奏错误")])]),n.isPercussion?null:e(I,null,[e("div",null,[e(h,{fill:"#FFAB25"},null),e("span",null,[r("音准错误")])]),e("div",null,[e(h,{fill:"#CC75FF"},null),e("span",null,[r("完成度不足")])])]),e("div",null,[e(h,{fill:"#000"},null),e("span",null,[r("未演奏")])])]),!o.isLoading&&e(X,{onRendered:d},null)])])}}),nt=[{path:"/",component:tt},{path:"/:pathMatch(.*)*",component:re,meta:{title:"404 Not Fund"}}],ot=ie({history:le(),routes:nt});(function(){const a=navigator.userAgent;ce({isApp:a.includes("ORCHESTRAAPPI")||a.includes("ORCHESTRAAPPA"),platformApi:a.includes("ORCHESTRATEACHER")?"/api-teacher":a.includes("ORCHESTRASTUDENT")?"/api-student":"/api-backend",platformType:a.includes("ORCHESTRATEACHER")?"TEACHER":a.includes("ORCHESTRASTUDENT")?"STUDENT":"WEB",proxy:""})})();ue(he).use(ot).mount("#app");export{st as __vite_legacy_guard};
|