1 |
- import{d as r,P as d,x as c,y as u,a,V as m,a2 as p,D as g}from"./index-869d77fb.js";import{M as o}from"./index-3eb77ad0.js";import{u as f,a as y}from"./index-155c29c2.js";import{s as i,b as v}from"./banner1-8cdfa8cc.js";import{A as b}from"./index-f6954181.js";import{I as k}from"./index-e76f2a88.js";import"./browser-504037ee.js";import"./index-43d9e077.js";import"./index-1c6c2ec0.js";const W=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{W as default};
|