index-legacy-5c472d99.js 2.2 KB

1
  1. !function(){function t(t,e,i,n,a,l,s){try{var o=t[l](s),c=o.value}catch(r){return void i(r)}o.done?e(c):Promise.resolve(c).then(n,a)}System.register(["./index-legacy-a314c7dd.js","./index-legacy-2788affc.js","./index-legacy-fb49b6ec.js","./banner1-legacy-91237376.js","./index-legacy-3d6d0664.js","./index-legacy-72dfb7ed.js","./browser-legacy-794fdde3.js","./index-legacy-141c80f8.js","./index-legacy-dff5e6e7.js"],(function(e,i){"use strict";var n,a,l,s,o,c,r,d,u,g,y,p,v,m,f;return{setters:[t=>{n=t.d,a=t.P,l=t.x,s=t.y,o=t.a,c=t.W,r=t.a2,d=t.D},t=>{u=t.M},t=>{g=t.u,y=t.a},t=>{p=t.s,v=t.b},t=>{m=t.A},t=>{f=t.I},null,null,null],execute:function(){e("default",n({name:"instrument-detail",setup(){const e=a(),i=l({titleOpacity:0,background:"transparent",color:"#fff",detail:{},musicList:[],loading:!1}),n=function(){var n,a=(n=function*(){i.loading=!0;try{const{data:t}=yield d.get("/edu-app/knowledgeWiki/detail/"+e.query.id);t.intros=t.intros.replace(/<video/gi,'<video style="width: 100% !important;" controlslist="nodownload" poster="https://oss.dayaedu.com/ktqy/1701759849244.png"'),i.detail=t||{},i.musicList=t.knowledgeWikiResources.map((t=>({id:t.id,name:t.name,url:t.url})))}catch(t){}i.loading=!1},function(){var e=this,i=arguments;return new Promise((function(a,l){var s=n.apply(e,i);function o(e){t(s,a,l,o,c,"next",e)}function c(e){t(s,a,l,o,c,"throw",e)}o(void 0)}))});return function(){return a.apply(this,arguments)}}();return s((()=>{g(document,"scroll",(()=>{const{y:t}=y();i.titleOpacity=t.value>100?1:t.value/100})),n()})),()=>o("div",{class:p.detail},[o("div",{class:p.bgSection},[o("img",{class:p.bg,src:i.detail.avatar||v},null)]),o(u,{position:"top"},{default:()=>[o(c,{border:!1,background:`rgba(255,255,255, ${i.titleOpacity})`,color:`rgba(51,51,51, ${i.titleOpacity})`,title:i.detail.name||""},null)]}),o("div",{class:p.container},[o("div",{class:p.instrumentLogo},[o(f,{class:p.logo,fit:"cover",src:i.detail.avatar},null)]),o("div",{class:p.title},[i.detail.name]),o("div",{class:p.content,innerHTML:i.detail.intros},null),!i.loading&&!i.detail.intros&&o(r,{description:"暂无内容"},null)]),o(u,{position:"bottom"},{default:()=>[i.musicList.length>0&&o(m,{musicList:i.musicList},null)]})])}}))}}}))}();