1 |
- import{r as A,d as y,g as N,o as M,s as F,aM as D,a as L,c as w,e as U,f as e,h as P,T as q,R as H,F as I,i as Q,j as J,N as O,U as j,n as B,l as G,m as n,k as r,P as K,a8 as V,as as W,ad as z,ae as b,af as Y,ag as X,ah as Z,ai as $,al as ee,am as te,an as ne,ao as oe,ac as se,ap as ae,at as ie,au as le,av as re,aw as ce,ax as ue,ay as de,az as pe}from"./index-369af630.js";import{P as me}from"./plyr.min-424cfb91.js";function it(){import.meta.url,import("_").catch(()=>1);async function*a(){}}const ge=async()=>await A.get("/user/getUserInfo"),ve=()=>A.get("/user/getUserInfo"),fe=()=>A.get("/user/getUserInfo"),he=a=>A.get("/musicSheet/detail/"+a),Ae=a=>A.get("/musicPracticeRecord/getLastEvaluationMusicalNotesPlayStats",{params:{recordId:a}}),ye=y({name:"App",setup(){const a=N(),l=async()=>P.platformType==="WEB"?await fe():P.platformType==="TEACHER"?await ve():await ge(),o=async()=>{const i=await l(),u=(i==null?void 0:i.data)||{};Q(u)};M(async()=>{if(a.Authorization)F(a.Authorization);else{const i=await D({api:"getToken"}),u=i==null?void 0:i.content;u!=null&&u.accessToken&&F(u.tokenType+" "+u.accessToken),console.log(u.tokenType+" "+u.accessToken)}o(),L(J())}),w(()=>{const i=document.getElementById("loading");i&&document.body.removeChild(i)});const g=U(()=>P.status==="login");return()=>e(I,null,[P.status==="error"?e(q,null,null):g.value?e(H,null,null):null])}}),_e="_skeleton_1lq3l_1",Pe="_detail_1lq3l_12",Ce="_headHeight_1lq3l_19",Ee="_headHide_1lq3l_28",we="_container_1lq3l_31",Be="_shareBox_1lq3l_47",Ie="_demos_1lq3l_56",Re="_right_1lq3l_76",Te="_wrong_1lq3l_80",Se="_notPlay_1lq3l_84",ke="_cadence_wrong_1lq3l_88",xe="_intonation_wrong_1lq3l_92",Fe="_integrity_wrong_1lq3l_96",c={skeleton:_e,detail:Pe,headHeight:Ce,headHide:Ee,container:we,shareBox:Be,demos:Ie,right:Re,wrong:Te,notPlay:Se,cadence_wrong:ke,intonation_wrong:xe,integrity_wrong:Fe},be="_headerTop_1m5my_1",Ne="_back_1m5my_11",Me="_left_1m5my_22",Ue="_center_1m5my_26",De="_cItem_1m5my_30",Le="_active_1m5my_52",qe="_right_1m5my_55",He="_btn_1m5my_59",Qe="_iconBtn_1m5my_70",Je="_btnWrap_1m5my_78",Oe="_popup_1m5my_83",je="_audiobox_1m5my_95",Ge="_videobox_1m5my_102",s={headerTop:be,back:Ne,left:Me,center:Ue,cItem:De,active:Le,right:qe,btn:He,iconBtn:Qe,btnWrap:Je,popup:Oe,audiobox:je,videobox:Ge},Ke="_container_1g67n_1",Ve="_noticeBar_1g67n_10",We="_icon_1g67n_14",ze="_status_1g67n_19",E={container:Ke,noticeBar:Ve,icon:We,status:ze},Ye=""+new URL("arrow-c0b252e8.svg",import.meta.url).href,Xe=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(O,{text:this.text,color:"#000",class:E.noticeBar,background:"none"},null),this.rightView?e("img",{class:E.status,src:Ye},null):null])}}),Ze=""+new URL("icon-back-a96b2fe2.png",import.meta.url).href,$e="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+Duf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:"header-top",props:{scoreData:{type:Object,default:()=>({})}},setup(a){const{scoreData:l}=j(a),o=B({show:!1,isInitPlyr:!1,_plrl:null}),g={BEGINNER:"入门级",ADVANCED:"进阶级",PERFORMER:"大师级"},i=G("intonation"),u=()=>{V()},v=d=>{},f=U(()=>{const d=(l.value.videoFilePath||"").split(".").pop();return d==="wav"||d==="mp3"?"audio":"video"}),C=()=>{o.show=!0,!o.isInitPlyr&&W(()=>{const d=f.value==="audio"?"#audioSrc":"#videoSrc";o._plrl=new me(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:Ze},null)]),e(Xe,{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:$e},null),e("span",null,[r("回放")])])]),e(K,{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":et,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)])])])])}}),nt={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},ot=y({name:"music-list",setup(){const a=N(),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 ee();if(t!=null&&t.content){const{isSpecialShapedScreen:p,notchHeight:m}=t.content;p&&(o.paddingLeft="25px")}o.paddingLeft="20px"};M(()=>{g(),z()});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=te(n.subjectId,"ORCHESTRA"),n.isPercussion=n.subjectId==23||n.subjectId==113||n.subjectId==121||ne(),n.fingeringInfo=oe(n.subjectId)},v=()=>{n.extConfigJson.multitrack&&se("multitrack",n.extConfigJson.multitrack)};w(async()=>{var p,m,R,T,S,k,x;window.appName="colexiu";const t=await Ae(a.id);n.partIndex=Number((p=t==null?void 0:t.data)==null?void 0:p.partIndex),o.musicalNotesPlayStats=((R=(m=t==null?void 0:t.data)==null?void 0:m.musicalNotesPlayStats)==null?void 0:R.notesData)||[],o.userMeasureScore=((T=t==null?void 0:t.data)==null?void 0:T.userMeasureScore)||{};for(let _ in l)l[_]=(S=t==null?void 0:t.data)==null?void 0:S[_];Promise.all([he((x=(k=t==null?void 0:t.data)==null?void 0:k.musicalNotesPlayStats)==null?void 0:x.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(nt[t.musicalErrorType])}},C=()=>{for(let t in o.userMeasureScore)le(o.userMeasureScore[t],!1)},d=t=>{n.musicRendered=!0,n.osmd=t,n.times=ae(t),console.log("🚀 ~ state.times:",n.times),f(),C(),ie()};return w(()=>{window.addEventListener("resize",b)}),Y(()=>{window.removeEventListener("resize",b)}),()=>e("div",{class:[c.shareBox,c.detail,n.setting.eyeProtection&&"eyeProtection"],style:{paddingLeft:o.paddingLeft}},[!n.musicRendered&&e("div",{class:c.skeleton},[e(X,{class:c.skeleton,row:8},null)]),e("div",{class:[c.headHeight,o.headerHide&&c.headHide],onClick:t=>t.stopPropagation()},[e(Z,{name:"van-slide-down"},{default:()=>[n.musicRendered&&e(tt,{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($,{onRendered:d},null)])])}}),st=[{path:"/",component:ot},{path:"/:pathMatch(.*)*",component:ue,meta:{title:"404 Not Fund"}}],at=re({history:ce(),routes:st});(function(){const a=navigator.userAgent;de({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:""})})();pe(ye).use(at).mount("#app");export{it as __vite_legacy_guard};
|