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