index-legacy-8355dd66.js 6.3 KB

1
  1. System.register(["./index-legacy-ee9e6573.js","./index-legacy-f121cb6e.js","./api-legacy-536753a2.js","./index-legacy-52bf9516.js","./catchData-legacy-480bc37c.js"],(function(t,e){"use strict";var i,a,n,c,s,o,d,l,r,_,m,g,h,u,w,v,p;return{setters:[t=>{i=t.T},t=>{a=t.d,n=t.u,c=t.e,s=t.n,o=t.f,d=t.w,l=t.F,r=t.j,_=t.k,m=t.A,g=t.t,h=t.aS},t=>{u=t.a,w=t.b},t=>{v=t.T},t=>{p=t.u}],execute:function(){var f=document.createElement("style");f.textContent='._container_hcm5w_1{display:flex;flex-direction:column;background:#FFFFFF;border-radius:1.04166667vw;min-height:100%}._tools_hcm5w_8{padding:1.66666667vw 1.66666667vw 1.04166667vw;display:flex;align-items:flex-start;flex-shrink:0}._tools_hcm5w_8 .n-input{margin-left:auto;width:18.75vw}._tools_hcm5w_8 .n-input__input-el{height:100%;line-height:100%}._tools_hcm5w_8 .n-button.n-button--disabled{cursor:initial;padding:0}._tools_hcm5w_8 ._tagWrap_hcm5w_26{flex:1;margin-right:1.04166667vw}._tools_hcm5w_8 ._tags_hcm5w_30{padding:.625vw 0}._tools_hcm5w_8 ._tags_hcm5w_30 ._firstButton_hcm5w_33{display:flex;align-items:center;justify-content:center;height:100%;font-size:.9375rem;color:#999;line-height:1.30208333vw}._tools_hcm5w_8 ._tags_hcm5w_30 .n-button{min-width:5.3125vw;height:1.92708333vw;padding:0 1.25vw;font-size:.9375rem}._content_hcm5w_48{flex:1;padding:1.04166667vw 1.875vw 1.875vw}._content_hcm5w_48._loadingContent_hcm5w_52{min-height:50vh}._item_hcm5w_55{position:relative;width:11.14583333vw;cursor:pointer;transition:all .3s}._item_hcm5w_55 ._cover_hcm5w_61{position:relative;overflow:hidden}._item_hcm5w_55 ._cover_hcm5w_61:before{content:"";position:absolute;top:5.57291667vw;left:0;width:11.14583333vw;height:11.14583333vw;background:#DDF2FF;border-radius:50%}._item_hcm5w_55:hover{transform:scale(1.1)}._item_hcm5w_55 ._itemImg_hcm5w_78{position:relative;width:8.22916667vw;height:11.61458333vw;margin:auto;background-color:#edeff2;background-image:url('+new URL("icon_default-495cec59.svg",e.meta.url).href+');background-repeat:no-repeat;background-position:center center}._item_hcm5w_55 ._itemImg_hcm5w_78:before{content:"";position:absolute;top:.20833333vw;right:-.20833333vw;width:.20833333vw;height:calc(100% - .41666667vw);background-color:#c5c5c5;z-index:1}._item_hcm5w_55 ._itemImg_hcm5w_78:after{content:"";position:absolute;top:.10416667vw;right:-.10416667vw;width:.20833333vw;height:calc(100% - .20833333vw);background-color:#e7e7e7;z-index:2}._item_hcm5w_55 ._itemImg_hcm5w_78 ._itemBg_hcm5w_108{position:absolute;top:0;left:0;width:100%;height:100%;z-index:4;background-repeat:no-repeat;background-image:linear-gradient(to right,rgba(0,0,0,.2) 0,rgba(255,255,255,.08) 0%,transparent .5%),linear-gradient(to right,rgba(0,0,0,.1) .3%,rgba(255,255,255,.09) 1.1%,transparent 1.3%);background-size:50% 100%,50% 100%;background-position:0% top,9% top}._item_hcm5w_55 ._itemImg_hcm5w_78 .n-image{position:relative;width:100%;height:100%;z-index:3}._item_hcm5w_55 ._itemImg_hcm5w_78 img{transition:opacity .3s;opacity:0}._item_hcm5w_55 ._itemImg_hcm5w_78 img[data-loaded=true]{opacity:1}._item_hcm5w_55 ._itemName_hcm5w_133{margin-top:.83333333vw;font-size:.83333333rem;font-weight:500;color:#333;text-align:center}\n',document.head.appendChild(f);const b="_container_hcm5w_1",y="_tools_hcm5w_8",I="_tagWrap_hcm5w_26",x="_tags_hcm5w_30",k="_firstButton_hcm5w_33",j="_content_hcm5w_48",C="_loadingContent_hcm5w_52",A="_item_hcm5w_55",z="_cover_hcm5w_61",T="_itemImg_hcm5w_78",F="_itemBg_hcm5w_108",S="_itemName_hcm5w_133";t("default",a({name:"XiaokuAi",setup(){const t=p(),e=n(),a=c({musicTagIds:[],enable:!0,subjectId:null,keyword:"",page:1,rows:9999}),f=c({tags:[],tagChildren:[],tagActiveId:"",tagActive:{},list:[],loading:!1}),N=async()=>{f.loading=!0;try{const t=await w({...a,musicTagIds:[f.tagActiveId,...a.musicTagIds].filter(Boolean)});Array.isArray(t?.data?.rows)&&(f.list=t.data.rows)}catch{}f.loading=!1},B=(t,e)=>{if(!t?.length)return;const i={columnName:t[0].columnName,list:[]},a=[];for(let n=0;n<t.length;n++)i.list.push({name:t[n].name,id:t[n].id,activeIndex:-1}),t[n].children&&a.push(...t[n].children);e.push(i),a.length&&B(a,e)};return s((async()=>{f.loading=!0;try{await(async()=>{const t=await u();if(Array.isArray(t?.data)&&t.data.length){f.tags=t.data,f.tagActiveId=t.data[0].id;const e=[];B(t.data[0].children,e),f.tagChildren=e}})(),await N(),await t.getSubjects()}catch{}f.loading=!1})),()=>{let n;return o("div",{class:b},[o("div",{class:y},[o("div",{class:I},[o("div",{class:x},[o(d,{size:[20,12]},{default:()=>[o("span",{class:k},[f.tags?.[0]?.columnName]),f.tags.map(((t,e)=>o(l,null,[o(r,{round:!0,secondary:f.tagActiveId!==t.id,type:f.tagActiveId===t.id?"primary":"default",onClick:()=>((t,e)=>{f.tagActiveId=t.id,a.musicTagIds=[];const i=[];B(f.tags[e].children,i),f.tagChildren=i,N()})(t,e)},{default:()=>[t.name]})])))]})]),f.tagChildren.map(((t,e)=>o("div",{class:x},[o(d,{size:[20,12]},{default:()=>[o("span",{class:k},[t.columnName]),t.list.map(((i,n)=>o(l,null,[o(r,{round:!0,secondary:t.activeIndex!==n,type:t.activeIndex===n?"primary":"default",onClick:()=>((t,e)=>{const i=f.tagChildren[t].list[f.tagChildren[t].activeIndex],n=f.tagChildren[t].list[e];i&&i.id!==n.id&&(a.musicTagIds=a.musicTagIds.filter((t=>t!==i.id))),a.musicTagIds.includes(n.id)?(a.musicTagIds=a.musicTagIds.filter((t=>t!==n.id)),f.tagChildren[t].activeIndex=-1):(a.musicTagIds.push(n.id),f.tagChildren[t].activeIndex=e),N()})(e,n)},{default:()=>[i.name]})])))]})]))),o("div",{class:x},[o(d,{size:[20,12]},{default:()=>[o("span",{class:k},[_("声部")]),t.getSubjectAllList.map((t=>o(l,null,[o(r,{round:!0,secondary:t.id!==a.subjectId,type:t.id===a.subjectId?"primary":"default",onClick:()=>{a.subjectId=t.id,N()}},{default:()=>[t.name]})])))]})])]),o(i,{round:!0,onSearch:t=>{a.keyword=t,N()}},null)]),o(m,{show:f.loading},{default:()=>{return[o("div",{class:[j,f.loading?C:""]},[f.list.length>0?o(d,{size:[50,40]},(t=n=f.list.map(((t,i)=>o("div",{class:A,key:`item-${i}`,onClick:()=>{sessionStorage.setItem("musicSubjectList",JSON.stringify(t.subjects)),e.push({path:"/xiaoku-music",query:{id:t.id,name:t.name}})}},[o("div",{class:z},[o("div",{class:T},[o("div",{class:F},null),o(g,{objectFit:"cover",src:t.coverImg,lazy:!0,previewDisabled:!0,onLoad:t=>{t.target.dataset.loaded="true"}},null)])]),o("div",{class:S},[t.name])]))),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!h(t)?n:{default:()=>[n]})):"",!f.loading&&f.list.length<=0&&o(v,null,null)])];var t}})])}}}))}}}));