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