| 1 |
- var R=Object.defineProperty,S=Object.defineProperties;var U=Object.getOwnPropertyDescriptors;var p=Object.getOwnPropertySymbols;var H=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;var v=(s,o,i)=>o in s?R(s,o,{enumerable:!0,configurable:!0,writable:!0,value:i}):s[o]=i,g=(s,o)=>{for(var i in o||(o={}))H.call(o,i)&&v(s,i,o[i]);if(p)for(var i of p(o))V.call(o,i)&&v(s,i,o[i]);return s},f=(s,o)=>S(s,U(o));import{c as w}from"./index.de4ff84e.js";import{d as D,u as L,r as I,w as W,c as e,a as n,at as x,e as j,o as M,au as B,av as P,aw as k,ax as Y,F as O,b as C,ay as q}from"./index.4271b524.js";import{s as Z}from"./start.1edc8c81.js";import{t as A}from"./index.b9365a38.js";import{m as z}from"./music.f2b8674a.js";import{a as X}from"./arrow.15dbd454.js";import{E as J,a as G}from"./index2.3b598bbb.js";import"./index2.6964d668.js";const K="_wall_1vmeh_1",Q="_width1200_1vmeh_4",$="_musicWrap_1vmeh_8",ee="_left_1vmeh_12",te="_title_1vmeh_18",ae="_titleLeft_1vmeh_27",se="_titleRight_1vmeh_38",ce="_musicContent_1vmeh_49",ie="_showCode_1vmeh_56",oe="_showCodeWrap_1vmeh_59",le="_close_1vmeh_64",re="_code_1vmeh_73",ne="_conent_1vmeh_95",ue="_subConent_1vmeh_106",he="_audios_1vmeh_117",me="_right_1vmeh_122",de="_musicInfo_1vmeh_122",_e="_tagList_1vmeh_136",pe="_collect_1vmeh_139",ve="_start_1vmeh_146",ge="_subTitle_1vmeh_158",fe="_btooom_1vmeh_166",we="_teacherInfo_1vmeh_169",Ce="_teacherHeadWrap_1vmeh_173",Ae="_teacherHeadLeft_1vmeh_179",ye="_teacherHeader_1vmeh_184",be="_teacherHeadName_1vmeh_191",De="_teacherIcon_1vmeh_205",Le="_fens_1vmeh_210",Ie="_teacherHeadRight_1vmeh_220",We="_isStart_1vmeh_231",Ee="_courseWrap_1vmeh_236",Fe="_courseTitle_1vmeh_240",Te="_titleWrap_1vmeh_255",Ne="_teacherDetail_1vmeh_274",Re="_teacherVideoList_1vmeh_281",Se="_videoItem_1vmeh_286",Ue="_Styles_1vmeh_293",He="_videoItemVideo_1vmeh_297",Ve="_otherMusic_1vmeh_304",xe="_videoNav_1vmeh_307",je="_wrapRight_1vmeh_320",Me="_arrow_1vmeh_328",Be="_otherMusicList_1vmeh_341";var a={wall:K,width1200:Q,musicWrap:$,left:ee,title:te,titleLeft:ae,titleRight:se,musicContent:ce,showCode:ie,showCodeWrap:oe,close:le,code:re,conent:ne,subConent:ue,audios:he,right:me,musicInfo:de,tagList:_e,collect:pe,start:ve,subTitle:ge,btooom:fe,teacherInfo:we,teacherHeadWrap:Ce,teacherHeadLeft:Ae,teacherHeader:ye,teacherHeadName:be,teacherIcon:De,fens:Le,teacherHeadRight:Ie,isStart:We,courseWrap:Ee,courseTitle:Fe,titleWrap:Te,teacherDetail:Ne,teacherVideoList:Re,videoItem:Se,Styles:Ue,videoItemVideo:He,otherMusic:Ve,videoNav:xe,wrapRight:je,arrow:Me,otherMusicList:Be},Pe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAAXNSR0IArs4c6QAAAiBJREFUWEftl79PGmEcxp/3DouJYTCxo05NyyB0oSWYTgw2YdKmOSIrg3+Btn9Cq3+BAyvGS9M6kejAZCC0LgKDbTqVURMHYuIP7r7NSyAhIN779Y7B9mUiued9vp973ueFO4FH9hGPjBcaeNI7phPWCQ8l8P9VIla1iVODRsryFZKvxRJUA3tsl07Yq8+6w14JDV/Xh04fuqEEdCX8ViJeszdA2BznQ4Q5zkEVAudj9QJb9aS1fZ+f0h9HrLq3CYhPwMTeUAigj41Udsvr5pWApclixc4LYAcCppcp6zrBIWC9uWQVVNYpA0uzlzV71XFRFMC0irmXhoAr00DuJGl989L2r7OA5aJ4zU67LvYFEFEdcpeOgLZhYKWetMocHzZwtx61LwnhuiUATznDBrRnZBiZZvL9MXf9g4C7z8GVYhQidABggTn0D6jztrGUO2Wu68ofDNxN+vvuvHDMQwBRxeGnZDrLzddrLUX9iMwXsHR7flycC9+GZD1eeUD8uJ7qZH4lcuN/hxXuwjewnPHiqBB5Eorsg5C+c6ZA+abTXvn5Jt9WYLpXEgiwnPCsVApPz14WBejd4ESC+Hp1MZP7nclc+4X13eERANs24/PYISDfMy/UW1iHZTlBwAYP3KOKVfc+y6+NVPZDUKB9n8AqETTYOL9/F5j7oM5NXPVtWjlhDTy0BTphbicnpVfu8KQAuL4amJsYV68T5ibG1f8FP3mqLWjC3hAAAAAASUVORK5CYII=",ke="./assets/banner.8da3ed92.png",Ye="./assets/code.b0b30240.png";const Oe="_itemWrap_sc4hu_1",qe="_left_sc4hu_12",Ze="_imgWrap_sc4hu_17",ze="_textWrap_sc4hu_22",Xe="_authorInfo_sc4hu_35",Je="_icon_sc4hu_40",Ge="_authorName_sc4hu_46";var m={itemWrap:Oe,left:qe,imgWrap:Ze,textWrap:ze,authorInfo:Xe,icon:Je,authorName:Ge},y=D({name:"musicItem",emits:["musicDetail"],props:{item:{type:Object,default:()=>({})},onClick:{type:Function,default:s=>{}}},setup(s,o){L();const i=I({item:s.item});W(()=>s.item,t=>{i.item=t});const l=()=>{o.emit("musicDetail",i.item.id)};return()=>e("div",{onClick:()=>{s.onClick(i.item)}},[e("div",{class:m.itemWrap,onClick:()=>l()},[e("div",{class:m.left},[e("div",{class:m.imgWrap},[e("img",{src:z,alt:""},null)]),e("div",{class:m.textWrap},[e("p",null,[i.item.musicSheetName]),e("p",null,[e("span",null,[n("\u4F5C\u66F2: "),i.item.composer])])])])])])}});const Ke=async s=>{const o=document.createElement("img");o.src=s,o.setAttribute("crossOrigin","anonymous"),await new Promise(t=>o.onload=t);const i=document.createElement("canvas");i.width=o.width,i.height=o.height;let l=i.getContext("2d");return l.fillStyle="rgb(255, 255, 255)",l.fillStyle="#fff",l.fillRect(0,0,o.width,o.height),l.drawImage(o,0,0),i},Qe=(s,o)=>{const i=s.getContext("2d"),l=document.createElement("canvas");l.width=500,l.height=300;const t=l.getContext("2d");t.clearRect(0,0,l.width,l.height),t.rotate(-25*Math.PI/180),t.font="50pt Calibri",t.fillStyle="rgba(149,155,170,0.2)",t.fillText("\u9177\u4E50\u79C0",-10,180);const u=i.createPattern(l,"repeat");return i.fillStyle=u,i.fillRect(0,0,s.width,s.height),s},$e=s=>s.toDataURL("image/png");function b(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!P(s)}var nt=D({name:"muiscDetial",props:{title:{type:String,default:""}},components:{colVideo:w,tagItem:A,musicItem:y},setup(s,o){const i=x(),l=L(),t=I({title:s.title,id:i.query.id,subjectId:"",subjectList:[],tagList:[],teacherDetail:{},musicDetail:{},musicList:[],mp3Type:"",activeRow:{},showCode:!1,userType:"",accompanyUrl:"",imgData:"",imgUrl:""});j();const u=async()=>{try{const c=await C.get(`/api-website/open/music/sheet/detail/${t.id}`,{});t.musicDetail=c.data,t.musicList=c.data.teacher.musicSheetList,t.subjectList=c.data.background,t.tagList=c.data.musicTagNames?c.data.musicTagNames.split(","):[],t.mp3Type=c.data.audioType,t.subjectList&&t.subjectList.length>0&&(t.activeRow=c.data.background[0],t.subjectId=c.data.background[0].id),t.teacherDetail=c.data.teacher,_(),console.log("\u8C03\u7528")}catch(c){console.log(c)}},E=async()=>{try{const c=await C.get("/api-website/student/starOrUnStar",{params:{userId:t.teacherDetail.userId,starStatus:t.teacherDetail.star?0:1}});u()}catch(c){console.log(c)}},F=c=>{t.id=c,l.push({query:f(g({},i.query),{id:t.id})}),u()};W(()=>t.accompanyUrl,c=>{t.accompanyUrl=c});const _=()=>{let c=q();t.accompanyUrl=c+`/accompany/colxiu-website.html?id=${t.id}&part-index=${t.subjectId}`};M(()=>{window.addEventListener("message",c=>{console.log(c),t.imgData=c.data},!1),t.userType=B(),t.showCode=t.userType=="STUDENT",u()});const T=async()=>{const c=await Ke(t.imgData),r=Qe(c),h=$e(r),d=document.createElement("a");d.setAttribute("download",t.musicDetail.musicSheetName+".png"),t.imgUrl=h,d.href=h,d.click()},N=()=>{l.push({path:"/searchdetail",query:{search:t.teacherDetail.userName,type:"music"}})};return()=>{let c;return e(O,null,[e("div",{class:a.wall},null),e("div",{class:[a.width1200,a.musicWrap]},[e("div",{class:a.left},[e("div",{class:a.title},[e("div",{class:a.titleLeft},[e("p",null,[n("\u58F0\u90E8\uFF1A")]),e(J,{class:"w-full subjectChiose",modelValue:t.subjectId,"onUpdate:modelValue":r=>t.subjectId=r,placeholder:"\u8BF7\u9009\u62E9\u58F0\u90E8",onChange:()=>{_()}},b(c=t.subjectList.map(r=>e(G,{key:r.id,value:r.id,label:r.track},null)))?c:{default:()=>[c]})]),e("div",{class:a.titleRight,onClick:()=>T()},[e("img",{src:Pe,alt:""},null),e("p",null,[n("\u4E0B\u8F7D\u4E50\u8C31")])])]),e("div",{class:a.musicContent},[e("iframe",{id:"containerPrint",ref:"print",style:"width: 100%;height:665px;page-break-after:always;",src:t.accompanyUrl,class:a.iframe},null)]),t.showCode?e("div",{class:a.showCode},[e("div",{class:a.showCodeWrap},[e("img",{class:a.close,src:k,alt:"",onClick:()=>{t.showCode=!1}},null),e("img",{class:a.code,src:Ye,alt:""},null),e("h2",{class:a.title},[n("\u9177\u4E50\u79C0")]),e("p",{class:a.conent},[n("\u626B\u7801\u4E0B\u8F7D\u9177\u4E50\u79C0APP")]),e("p",{class:a.subConent},[n("\u4F7F\u7528\u5C0F\u9177Ai\u5373\u53EF\u667A\u80FD\u7EC3\u4E60\u672C\u9996\u66F2\u76EE\u54E6\uFF01")]),e("img",{src:ke,alt:""},null)])]):null,t.mp3Type=="MP3"?e(w,{src:t.activeRow.audioFileUrl,styleValue:{height:"68px",bacground:"#333"},type:"audto",settings:["captions","quality","speed","loop"],class:a.audios},null):null]),e("div",{class:a.right},[e("div",{class:a.musicInfo},[e("h2",null,[n("\u66F2\u76EE\uFF1A"),t.musicDetail.musicSheetName]),e("div",{class:a.collect},[e("img",{src:Z,class:a.start,alt:""},null),e("p",null,[t.musicDetail.favoriteNum,n("\u4EBA\u6536\u85CF")])]),e("div",{class:a.tagList},[t.tagList.map(r=>e(A,{title:r},b(r)?r:{default:()=>[r]}))]),e("p",{class:a.subTitle},[n("\u4F5C\u66F2\u4EBA\uFF1A"),e("span",null,[t.musicDetail.composer])]),e("p",{class:a.subTitle},[n("\u58F0\u90E8\uFF1A"),e("span",null,[t.musicDetail.subjectNames])])]),e("div",{class:a.btooom},[t.teacherDetail.userId?e("div",{class:a.teacherInfo},[e("div",{class:a.teacherHeadWrap},[e("div",{class:a.teacherHeadLeft},[e("img",{src:t.teacherDetail.avatar?t.teacherDetail.avatar:Y,alt:"",class:a.teacherHeader},null),e("div",{class:a.teacherHeadInfo},[e("div",{class:a.teacherHeadName},[e("span",null,[t.teacherDetail.userName])]),e("p",{class:a.fens},[n("\u7C89\u4E1D "),e("span",null,[t.teacherDetail.fansNum])])])]),t.userType=="STUDENT"?e("div",{class:[a.teacherHeadRight,t.teacherDetail.star?a.isStart:""],onClick:()=>E()},[t.teacherDetail.star?"\u5DF2\u5173\u6CE8":"\u5173\u6CE8"]):null])]):null,e("div",{class:a.otherMusic},[e("div",{class:a.videoNav},[e("h5",null,[n("Ta\u7684\u66F2\u8C31")]),e("div",{class:a.wrapRight,onClick:()=>N()},[e("span",null,[n("\u66F4\u591A")]),e("img",{class:a.arrow,src:X,alt:""},null)])]),e("div",{class:a.otherMusicList},[t.musicList.map(r=>e(y,{item:r,onMusicDetail:h=>F(h)},null))])])])])])])}}});export{nt as default};
|