1 |
- import{d,P as u,x as m,y as p,a,W as g,A as o,a2 as v,D as y}from"./index-521a9826.js";import{M as n}from"./index-c0ea6da9.js";import{u as f,a as b}from"./index-fdaad3c0.js";import{s as i}from"./index.module-d955ef3a.js";import{m as l,A as k}from"./index-45e9afd1.js";import{I as F}from"./index-25b5c9d0.js";import{N as L}from"./index-6dc4c05e.js";import"./browser-504037ee.js";import"./index-631128d0.js";import"./index-1ad6a58d.js";const W=d({name:"instrument-detail",setup(){const r=u(),t=m({titleOpacity:0,background:"transparent",detail:{},musicList:[],loading:!1}),c=async()=>{t.loading=!0;try{const{data:s}=await y.get("/edu-app/knowledgeWiki/detail/"+r.query.id);s.intros=s.intros.replace(/<video/gi,'<video style="width: 100% !important;" controlslist="nodownload" poster="https://oss.dayaedu.com/ktqy/1701759849244.png"'),t.detail=s||{},t.musicList=s.knowledgeWikiResources.map(e=>({id:e.id,name:e.name,url:e.url}))}catch(s){}t.loading=!1};return p(()=>{f(document,"scroll",()=>{const{y:s}=b();t.titleOpacity=s.value>100?1:s.value/100}),c()}),()=>a("div",{class:i.detail},[a("div",{class:i.bgSection},[a("img",{class:i.bg,src:t.detail.avatar||l},null)]),a(n,{position:"top"},{default:()=>[a(g,{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.musicHeader},[a("div",{class:i.imgSection},[a(F,{class:i.img,src:t.detail.avatar||l,fit:"cover"},null),a("div",{class:i.pan},[a("img",{src:t.detail.avatar||l},null)])]),a("div",{class:i.musicContent},[a("div",{class:[i.musicTitle,"van-multi-ellipsis--l2"]},[a(L,{scrollable:t.detail.name>=13,background:"transparent",text:t.detail.name||"--"},null)]),a("div",{class:i.musicInto},[t.detail.lyricists&&a("span",null,[o("作词:"),t.detail.lyricists]),t.detail.composers&&a("span",null,[o("作曲:"),t.detail.composers])])])]),t.detail.intros?a("div",{class:i.content,innerHTML:t.detail.intros},null):"",!t.loading&&!t.detail.intros&&a("div",{class:i.content},[a(v,{description:"暂无内容"},null)])]),a(n,{position:"bottom"},{default:()=>[t.musicList.length>0&&a(k,{musicList:t.musicList},null)]})])}});export{W as default};
|