1 |
- import{d as f,P as g,S as s,j as a,be as h,F as y,w as C,g as T,U as P}from"./index.e6d6174e.js";import"./index.9093bc60.js";import"./index.b4a53c6a.js";import{T as S,a as i}from"./index.54627972.js";import{b as w}from"./index.684ca989.js";import{C as A}from"./index.af99cf22.js";import{s as d,P as F,A as x,C as k,a as E}from"./album-my.73c5067b.js";import{S as M}from"./index.311acfa6.js";import{g as R}from"./music.ce788382.js";import{u as q}from"./hooks.00b5b341.js";import"./use-id.f239f36f.js";import"./use-tab-status.e9ba8498.js";import"./use-refs.eb803454.js";import"./index.f904775d.js";import"./index.f5daa90d.js";import"./index.c3601b28.js";import"./index.67c54471.js";import"./icon-xin.df8ab2d7.js";import"./icon_uploader.9f387137.js";import"./icon_album.fa329df6.js";import"./icon_album_active.ce98b2a8.js";import"./icon_exquisite.69e33c80.js";import"./icon_music_active.3b316ab8.js";import"./icon-play.bc9e7aab.js";var D=f({name:"Practice",emits:["favorite"],setup(t,{expose:u,emit:p}){const n=g(),e=s(0),{isLoading:l,state:o,execute:m}=w(r=>C.get("/music/sheet/practice",{prefix:T.platformType==="TEACHER"?"/api-teacher":"/api-student",params:{rows:(r==null?void 0:r.rows)||3}}),null);return u({reload:m}),()=>{var c;const r=((c=o.value)==null?void 0:c.data.rows)||[];return e.value===0&&(e.value=r.length),a(y,null,[e.value>0&&a(A,{title:"\u6700\u8FD1\u7EC3\u4E60",border:!1},null),a("div",{class:d.practice},[a(M,{list:r,onDetail:v=>{const b=location.origin+location.pathname+"#/music-detail?id="+v.id;h(b,()=>{n.push({path:"/music-detail",query:{id:v.id}})})}},null)])])}}}),oe=f({name:"MusicPersonal",setup(){localStorage.setItem("behaviorId",R());const t=s("personal"),u=s(),p=s(),n=s();return P(()=>{q("\u6211\u7684\u4E50\u8C31")}),()=>a("div",{class:d.personal},[a(D,{ref:n,onFavorite:()=>{var e,l,o,m;t.value==="personal"?(l=(e=u.value)==null?void 0:e.reset)==null||l.call(e):t.value==="collection"&&((m=(o=p.value)==null?void 0:o.reset)==null||m.call(o))}},null),a(S,{color:"var(--van-primary)",background:"transparent",lineWidth:20,shrink:!0,active:t.value,"onUpdate:active":e=>t.value=e,onChange:e=>t.value=e},{default:()=>[a(i,{title:"\u6211\u7684\u5355\u66F2",name:"personal"},null),a(i,{title:"\u6211\u7684\u4E13\u8F91",name:"personal-album"},null),a(i,{title:"\u6536\u85CF\u5355\u66F2",name:"collection"},null),a(i,{title:"\u6536\u85CF\u4E13\u8F91",name:"album"},null),a(i,{title:"\u8D60\u9001\u5355\u66F2",name:"personal-gift"},null),a(i,{title:"\u8D60\u9001\u4E13\u8F91",name:"album-gift"},null)]}),(t.value==="personal"||t.value==="personal-gift")&&a(F,{ref:u,gift:t.value==="personal-gift"?1:0,onFavorite:()=>{var e,l;(l=(e=n.value)==null?void 0:e.reload)==null||l.call(e)}},null),(t.value==="personal-album"||t.value==="album-gift")&&a(x,{gift:t.value==="album-gift"?1:0},null),t.value==="collection"&&a(k,{ref:p,onFavorite:()=>{var e,l;(l=(e=n.value)==null?void 0:e.reload)==null||l.call(e)}},null),t.value==="album"&&a(E,null,null)])}});export{oe as default};
|