import{d as r,P as d,x as c,y as u,a,W as m,a7 as p,D as g}from"./index-7945cc5d.js";import{M as o}from"./index-264ec3df.js";import{u as f,a as y}from"./index-ce5f9846.js";import{s as i,b as v}from"./banner1-8cdfa8cc.js";import{A as b}from"./index-58a39c30.js";import{I as k}from"./index-610eeac6.js";import"./browser-504037ee.js";import"./index-81fd51cf.js";import"./index-7ae44f82.js";const S=r({name:"instrument-detail",setup(){const l=d(),t=c({titleOpacity:0,background:"transparent",color:"#fff",detail:{},musicList:[],loading:!1}),n=async()=>{t.loading=!0;try{const{data:e}=await g.get("/edu-app/knowledgeWiki/detail/"+l.query.id);e.intros=e.intros.replace(/<video/gi,'<video style="width: 100% !important;" controlslist="nodownload" poster="https://oss.dayaedu.com/ktqy/1701759849244.png"'),t.detail=e||{},t.musicList=e.knowledgeWikiResources.map(s=>({id:s.id,name:s.name,url:s.url}))}catch(e){}t.loading=!1};return u(()=>{f(document,"scroll",()=>{const{y:e}=y();t.titleOpacity=e.value>100?1:e.value/100}),n()}),()=>a("div",{class:i.detail},[a("div",{class:i.bgSection},[a("img",{class:i.bg,src:t.detail.avatar||v},null)]),a(o,{position:"top"},{default:()=>[a(m,{border:!1,background:`rgba(255,255,255, ${t.titleOpacity})`,color:`rgba(51,51,51, ${t.titleOpacity})`,title:t.detail.name||""},null)]}),a("div",{class:i.container},[a("div",{class:i.instrumentLogo},[a(k,{class:i.logo,fit:"cover",src:t.detail.avatar},null)]),a("div",{class:i.title},[t.detail.name]),a("div",{class:i.content,innerHTML:t.detail.intros},null),!t.loading&&!t.detail.intros&&a(p,{description:"暂无内容"},null)]),a(o,{position:"bottom"},{default:()=>[t.musicList.length>0&&a(b,{musicList:t.musicList},null)]})])}});export{S as default};
