index-legacy.35786fdc.js 7.2 KB

1
  1. !function(){function e(e,a,n,t,r,i,u){try{var c=e[i](u),o=c.value}catch(l){return void n(l)}c.done?a(o):Promise.resolve(o).then(t,r)}function a(a){return function(){var n=this,t=arguments;return new Promise((function(r,i){var u=a.apply(n,t);function c(a){e(u,r,i,c,o,"next",a)}function o(a){e(u,r,i,c,o,"throw",a)}c(void 0)}))}}function n(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function t(e){for(var a=1;a<arguments.length;a++){var t=null!=arguments[a]?arguments[a]:{};a%2?n(Object(t),!0).forEach((function(a){r(e,a,t[a])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):n(Object(t)).forEach((function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(t,a))}))}return e}function r(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}var i=document.createElement("style");i.innerHTML='._sticky_1evma_1 .van-sticky--fixed{box-shadow:.26667rem .26667rem .26667rem var(--box-shadow-color)}._label_1evma_4{margin-right:.21333rem;font-size:.37333rem}._label_1evma_4 .van-list__loading,._label_1evma_4 .van-list__finished-text,._label_1evma_4 .van-list__error-text{width:100%}._label_1evma_4 .iconfont-down{margin-left:.10667rem}._musicGrid_1evma_16{margin:.42667rem .32rem}._tagTabs_1evma_19 .van-tabs__nav{background-color:#f6f8f9;padding:0}._tagTabs_1evma_19 .van-tab{font-size:.42667rem;font-weight:700}._tagTabs_1evma_19 .van-tab--shrink{padding:0;margin:.4rem}._tagTabs_1evma_19 .van-tab--active:after{content:" ";display:inline-block;width:96%;position:absolute;height:.18667rem;background:rgba(45,199,170,.5);border-radius:.10667rem;bottom:0;left:2%;transition:all ease .3s}._tagTabs_1evma_19 .van-tab--active .van-tab__text{z-index:1}._tagTabs_1evma_19 .van-tabs__line{height:0}\n',document.head.appendChild(i),System.register(["./ResizeObserver.es-legacy.44b91b4c.js","./index-legacy.43e69380.js","./index-legacy.3ccba950.js","./index-legacy.9d5cae73.js","./index-legacy.cf09c997.js","./index-legacy.bdbc14c4.js","./select-subject-legacy.3ce6058e.js","./hooks-legacy.5cc9e329.js","./index-legacy.356b35d8.js","./index-legacy.4bad5b90.js","./index-legacy.6ac2a941.js","./index-legacy.9696a579.js","./use-tab-status-legacy.d7434e0b.js","./use-id-legacy.ef8b5e97.js","./use-refs-legacy.d925b49f.js","./index-legacy.c8c5bc4e.js","./index-legacy.cae55a25.js","./index-legacy.9d25098b.js","./index-legacy.0b3e1f8d.js","./index-legacy.4be048cf.js","./icon-xin-legacy.4bf69856.js"],(function(e){"use strict";var n,r,i,u,c,o,l,s,f,d,m,v,b,p,g,_,y,h,j,x,w,T,S;return{setters:[function(e){n=e.d,r=e.y,i=e.g,u=e.U,c=e.Q,o=e.P,l=e.S,s=e.j,f=e.N,d=e.C,m=e.aS,v=e.F},function(e){b=e.L},function(){},function(){},function(e){p=e.T,g=e.a},function(e){_=e.S},function(e){y=e.S},function(e){h=e.a,j=e.S},function(e){x=e.M},function(e){w=e.c},function(e){T=e.C},function(e){S=e.T},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var E="_sticky_1evma_1",O="_label_1evma_4",C="_musicGrid_1evma_16",A="_tagTabs_1evma_19";e("default",n({name:"Album",props:{hideSearch:{type:Boolean,default:!1},defauleParams:{type:Object,default:function(){return{}}}},setup:function(e,n){var k=e.hideSearch,P=e.defauleParams,R=n.expose,H=w(r(i.platformApi+"/MusicTag/tree",{params:{type:"ALBUM"}}),null),N=(H.isLoading,H.state),I=u({id:"",name:""});if("TEACHER"===i.platformType){var L=i.user.data;I.value={name:L.defaultSubjectName||"全部声部",id:L.defaultSubject||""}}else{if(!h(j.SEARCH).id){var z=i.user.data,M=z.subjectId?Number(z.subjectId.split(",")[0]):"",D=z.subjectName?z.subjectName.split(",")[0]:"";M&&h(j.SEARCH,JSON.stringify({id:M,name:D}),"set")}}var B=c(),U=o(),q={};if(i.version&&(q.version=i.version||"",q.platform="STUDENT"===i.platformType?"ios-student":"ios-teacher"),q.myself=!1,!k)if("TEACHER"===i.platformType)q.subjectIds=I.value.id;else{var G=h(j.SEARCH);q.subjectIds=G.id}var J=l(t(t({search:U.query.search||"",albumTagIds:U.query.tagids||"",page:1},P),q)),F=u(null),Q=u(!1),V=u(!1),K=u(!1),W=u(!1),X=function(e){J.page=1,J.search=e,F.value=null,Y()},Y=function(){var e=a(regeneratorRuntime.mark((function e(){var a,n,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Q.value){e.next=2;break}return e.abrupt("return");case 2:return Q.value=!0,K.value=!1,e.prev=4,e.next=7,r.post("/music/album/list",{prefix:"TEACHER"===i.platformType?"/api-teacher":"/api-student",data:t(t({},J),{},{idAndName:J.search})});case 7:a=e.sent,F.value&&(u=((null===(n=F.value)||void 0===n?void 0:n.rows)||[]).concat(a.data.rows||[]),F.value.rows=u),F.value=F.value||a.data,J.page=a.data.pageNo+1,V.value=a.data.pageNo>=a.data.totalPage,e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),K.value=!0;case 17:Q.value=!1;case 18:case"end":return e.stop()}}),e,null,[[4,14]])})));return function(){return e.apply(this,arguments)}}(),Z=function(){var e=a(regeneratorRuntime.mark((function e(a){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r.post("/api-teacher/teacher/defaultSubject",{params:{subjectId:a}});case 3:e.next=7;break;case 5:e.prev=5,e.t0=e.catch(0);case 7:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(a){return e.apply(this,arguments)}}(),$=function(e){J.page=1,J.subjectIds=e.id,F.value=null,"TEACHER"===i.platformType?(I.value={name:e.name,id:e.id},Z(e.id)):(ae.id=e.id,ae.name=e.name,h(j.SEARCH,JSON.stringify({id:e.id,name:e.name}),"set")),Y(),ae.show=!1};R({onSearch:X,onComfirm:function(e){var a=Object.values(e).flat().filter(Boolean).join(",");J.albumTagIds=a,J.page=1,F.value=null,Y(),W.value=!1},onComfirmSubject:$});var ee=h(j.SEARCH),ae=l({show:!1,name:ee.name||"全部声部",id:ee.id||""});return function(){var e=N.value&&N.value.data||[];return s(v,null,[s(b,{loading:Q.value,finished:V.value,"finished-text":F.value&&F.value.rows.length?"没有更多了":"",onLoad:Y,error:K.value},{default:function(){return[!k&&s(S,{class:E},{default:function(){return[s(T,{border:!1},null),s(_,{modelValue:J.search,onSearch:X,placeholder:"请输入专辑名称 "},{left:function(){return s("div",{class:O,onClick:function(){return ae.show=!0}},["TEACHER"===i.platformType?I.value.name:ae.name,s(f,{classPrefix:"iconfont",name:"down",size:12,color:"#333"},null)])}}),s(p,{shrink:!0,class:A,lineHeight:0,"onClick-tab":function(e){J.albumTagIds=e.name,F.value=null,J.page=1,Y()}},{default:function(){return[s(g,{title:"全部",name:""},null),e.map((function(e){return s(g,{title:e.name,name:e.id},null)}))]}})]}}),F.value&&F.value.rows.length?s("div",{class:C},[s(x,{list:F.value.rows,onGoto:function(e){var a="TEACHER"===i.platformType?I.value:ae;B.push({name:"music-album-detail",params:{id:e.id},query:{subjectId:a.id,subjectName:a.name}})}},null)]):!Q.value&&s(d,{tips:"暂无专辑",classImgSize:"SMALL",btnStatus:!1},null)]}}),s(m,{show:ae.show,position:"bottom",round:!0,closeable:!0,"safe-area-inset-bottom":!0,onClose:function(){return ae.show=!1},onClosed:function(){return ae.show=!1}},{default:function(){return[s(y,{type:"ALBUM",searchParams:"TEACHER"===i.platformType?I.value:ae,onComfirm:$},null)]}})])}}}))}}}))}();