index-legacy.59b591b4.js 1.3 KB

1
  1. System.register(["./index-legacy.eb062188.js","./index.module-legacy.9b2d2c6b.js","./index-legacy.fecc738b.js"],(function(e){"use strict";var c,t,a,n,s,i,o,l,r,u,d,g,p,h;return{setters:[function(e){c=e.d,t=e.ah,a=e.ag,n=e.r,s=e.Z,i=e.$,o=e.c,l=e.aj,r=e.L,u=e.m,d=e.g},function(e){g=e.s,p=e.g},function(e){h=e.I}],execute:function(){e("default",c({name:"accompany",setup(e,c){const m=t(),y=a(),v=n({childPath:"",svgs:[],musicTreeActive:""}),b=()=>{const e=(null==m?void 0:m.path)||"accompany";v.childPath=e.replace(/\//g,"")||"accompany",console.log("🚀 ~ route.path",v.childPath)};return s((()=>m.path),(()=>{b()})),i((()=>{(async()=>{try{const e=await u.get(d.platformApi+"/musicSheetCategories/queryTree?enable=true");Array.isArray(null==e?void 0:e.data)&&(v.svgs=e.data.map(((e,c)=>({...e,id:e.id,icon:e.coverImg,btnIcon:p("b2.svg"),color:"#9881FF",title:e.name,subtitle:"",btnText:"GO >"}))),console.log("🚀 ~ data.svgs",v.svgs))}catch(e){console.log(e)}b()})()})),()=>o("div",{class:g.accompany},[o(l,null,null),o("div",{class:g.accompanyCategory},[v.svgs.map((e=>o("div",{class:g.container,onClick:()=>{y.push({path:"/musicList",query:{categorieid:e.id}})}},[o(h,{src:e.icon,width:"100%",height:"100%"},{loading:()=>o(r,{type:"spinner",size:"20"},null)})])))])])}}))}}}));