index-legacy.5d46f681.js 5.0 KB

1
  1. !function(){function e(e,n,a,l,t,i,u){try{var c=e[i](u),o=c.value}catch(r){return void a(r)}c.done?n(o):Promise.resolve(o).then(l,t)}System.register(["./ResizeObserver.es-legacy.8d60aee1.js","./index-legacy.6a5df59c.js","./index-legacy.7e047c4c.js","./index-legacy.183eabe8.js","./index-legacy.bbc2b10e.js","./index-legacy.610f0a70.js","./song-empty-legacy.0a91aed1.js","./album-my-legacy.4b6474f3.js","./index-legacy.c6de691c.js","./music-legacy.33d8b690.js","./hooks-legacy.f81762aa.js","./index-legacy.87bcd48f.js","./use-id-legacy.54528695.js","./use-tab-status-legacy.1f35f332.js","./use-refs-legacy.82f31dee.js","./index-legacy.c07bb851.js","./index-legacy.fc9acec5.js","./index-legacy.b6bb491f.js","./index-legacy.4a75d877.js","./icon-xin-legacy.4bf69856.js","./icon_uploader-legacy.6fd22d7f.js","./icon_album-legacy.06fe8c1c.js","./icon_album_active-legacy.4391adb4.js","./icon_exquisite-legacy.24bc10bb.js","./icon_music_active-legacy.51780227.js","./icon-play-legacy.50b88257.js"],(function(n){"use strict";var a,l,t,i,u,c,o,r,s,f,v,d,g,p,m,b,y,j,x,h,C,w,S,_,k,I;return{setters:[function(e){a=e.d,l=e.Q,t=e.U,i=e.j,u=e.be,c=e.aS,o=e.A,r=e.B,s=e.F,f=e.y,v=e.g,d=e.V},function(){},function(){},function(e){g=e.T,p=e.a},function(e){m=e.c},function(e){b=e.C},function(e){y=e.s},function(e){j=e.s,x=e.P,h=e.A,C=e.C,w=e.a},function(e){S=e.S},function(e){_=e.g},function(e){k=e.u},function(e){I=e.C},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var E=a({name:"Practice",emits:["favorite"],setup:function(n,a){var d=a.expose,g=(a.emit,l()),p=t(0),x=t(!1),h=t({}),C=m((function(e){return f.get("/music/sheet/practice",{prefix:"TEACHER"===v.platformType?"/api-teacher":"/api-student",params:{rows:(null==e?void 0:e.rows)||3}})}),null),w=(C.isLoading,C.state),_=C.execute,k=function(){var n,a=(n=regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,f.get("/music/sheet/practice/del/"+h.value.id,{prefix:"TEACHER"===v.platformType?"/api-teacher":"/api-student"});case 3:_(),x.value=!1,e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}}),e,null,[[0,7]])})),function(){var a=this,l=arguments;return new Promise((function(t,i){var u=n.apply(a,l);function c(n){e(u,t,i,c,o,"next",n)}function o(n){e(u,t,i,c,o,"throw",n)}c(void 0)}))});return function(){return a.apply(this,arguments)}}();return d({reload:_}),function(){var e,n=(null===(e=w.value)||void 0===e?void 0:e.data.rows)||[];return 0===p.value&&(p.value=n.length),i(s,null,[p.value>0&&i(b,{title:"最近练习",border:!1},null),i("div",{class:j.practice},[i(S,{list:n,onDetail:function(e){if(1===e.play)return h.value=e,void(x.value=!0);var n=location.origin+location.pathname+"#/music-detail?id="+e.id;u(n,(function(){g.push({path:"/music-detail",query:{id:e.id}})}))}},null)]),i(c,{show:x.value,class:j.songEfficacy,round:!0,onClose:function(){return x.value=!1}},{default:function(){return[i("div",{class:j.songContainer},[i("div",{class:j.title},[o("该曲目已失效")]),i("img",{src:y},null),i("div",{class:j.btnGroup},[i(r,{round:!0,onClick:k},{default:function(){return[o("我知道了")]}})])])]}})])}}});n("default",a({name:"MusicPersonal",setup:function(){localStorage.setItem("behaviorId",_());var e=sessionStorage.getItem("music-personal-tab-value");sessionStorage.removeItem("music-personal-tab-value");var n=t(e||"personal");sessionStorage.setItem("music-personal-tab-value",n.value);var a=t(),l=t(),u=t();return d((function(){k("我的乐谱")})),function(){return i("div",{class:j.personal},[i(I,null,null),i(E,{ref:u,onFavorite:function(){var e,t;if("personal"===n.value)null===(e=a.value)||void 0===e||null===(t=e.reset)||void 0===t||t.call(e);else if("collection"===n.value){var i,u;null===(i=l.value)||void 0===i||null===(u=i.reset)||void 0===u||u.call(i)}}},null),i(g,{color:"var(--van-primary)",background:"transparent",lineWidth:20,shrink:!0,active:n.value,"onUpdate:active":function(e){return n.value=e},onChange:function(e){n.value=e,sessionStorage.setItem("music-personal-tab-value",e)}},{default:function(){return[i(p,{title:"我的单曲",name:"personal"},null),i(p,{title:"我的专辑",name:"personal-album"},null),i(p,{title:"收藏单曲",name:"collection"},null),i(p,{title:"收藏专辑",name:"album"},null),i(p,{title:"赠送单曲",name:"personal-gift"},null),i(p,{title:"赠送专辑",name:"album-gift"},null)]}}),("personal"===n.value||"personal-gift"===n.value)&&i(x,{ref:a,gift:"personal-gift"===n.value?1:0,onFavorite:function(){var e,n;null===(e=u.value)||void 0===e||null===(n=e.reload)||void 0===n||n.call(e)}},null),("personal-album"===n.value||"album-gift"===n.value)&&i(h,{gift:"album-gift"===n.value?1:0},null),"collection"===n.value&&i(C,{ref:l,onFavorite:function(){var e,n;null===(e=u.value)||void 0===e||null===(n=e.reload)||void 0===n||n.call(e)}},null),"album"===n.value&&i(w,null,null)])}}}))}}}))}();