index-legacy.e64eb9e9.js 7.0 KB

1
  1. !function(){function e(e,a,t,n,r,i,u){try{var o=e[i](u),l=o.value}catch(s){return void t(s)}o.done?a(l):Promise.resolve(l).then(n,r)}function a(a){return function(){var t=this,n=arguments;return new Promise((function(r,i){var u=a.apply(t,n);function o(a){e(u,r,i,o,l,"next",a)}function l(a){e(u,r,i,o,l,"throw",a)}o(void 0)}))}}function t(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,n)}return t}function n(e){for(var a=1;a<arguments.length;a++){var n=null!=arguments[a]?arguments[a]:{};a%2?t(Object(n),!0).forEach((function(a){r(e,a,n[a])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))}))}return e}function r(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,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(["./index-legacy.b2528a15.js","./index-legacy.4f922f18.js","./index-legacy.9cbe7ce8.js","./index-legacy.3f4943f0.js","./index-legacy.7e6f30e7.js","./index-legacy.a87134f4.js","./select-subject-legacy.c994b589.js","./hooks-legacy.fb8d6c34.js","./index-legacy.3a0d59fb.js","./index-legacy.44baf7f8.js","./use-tab-status-legacy.5c2c2da3.js","./use-id-legacy.4f071235.js","./use-refs-legacy.2f8acfce.js","./index-legacy.207dc8c2.js","./index-legacy.ab501af1.js","./index-legacy.edff980f.js","./index-legacy.73f03537.js","./index-legacy.ca42ae97.js","./icon-xin-legacy.18ed4a9d.js"],(function(e){"use strict";var t,r,i,u,o,l,s,c,f,d,m,v,p,b,g,_,h,y,j,x,w,T;return{setters:[function(e){t=e.d,r=e.e,i=e.s,u=e.U,o=e.Q,l=e.P,s=e.S,c=e.i,f=e.N,d=e.C,m=e.aT,v=e.F},function(e){p=e.S},function(e){b=e.L},function(){},function(e){g=e.T,_=e.a},function(e){h=e.C},function(e){y=e.S},function(e){j=e.a,x=e.S},function(e){w=e.M},function(e){T=e.b},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var S="_sticky_1evma_1",O="_label_1evma_4",C="_musicGrid_1evma_16",E="_tagTabs_1evma_19";e("default",t({name:"Album",props:{hideSearch:{type:Boolean,default:!1},defauleParams:{type:Object,default:function(){return{}}}},setup:function(e,t){var k=e.hideSearch,A=e.defauleParams,P=t.expose,R=T(r(i.platformApi+"/MusicTag/tree",{params:{type:"ALBUM"}}),null),H=(R.isLoading,R.state),N=u({id:"",name:""});if("TEACHER"===i.platformType){var I=i.user.data;N.value={name:I.defaultSubjectName||"全部声部",id:I.defaultSubject||""}}else{if(!j(x.SEARCH).id){var L=i.user.data,M=L.subjectId?Number(L.subjectId.split(",")[0]):"",z=L.subjectName?L.subjectName.split(",")[0]:"";M&&j(x.SEARCH,JSON.stringify({id:M,name:z}),"set")}}var D=o(),B=l(),U={};if(i.version&&(U.version=i.version||"",U.platform="STUDENT"===i.platformType?"ios-student":"ios-teacher"),U.myself=!1,!k)if("TEACHER"===i.platformType)U.subjectIds=N.value.id;else{var G=j(x.SEARCH);U.subjectIds=G.id}var q=s(n(n({search:B.query.search||"",albumTagIds:B.query.tagids||"",page:1},A),U)),J=u(null),F=u(!1),Q=u(!1),V=u(!1),K=u(!1),W=function(e){q.page=1,q.search=e,J.value=null,X()},X=function(){var e=a(regeneratorRuntime.mark((function e(){var a,t,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!F.value){e.next=2;break}return e.abrupt("return");case 2:return F.value=!0,V.value=!1,e.prev=4,e.next=7,r.post("/music/album/list",{prefix:"TEACHER"===i.platformType?"/api-teacher":"/api-student",data:n(n({},q),{},{idAndName:q.search})});case 7:a=e.sent,J.value&&(u=((null===(t=J.value)||void 0===t?void 0:t.rows)||[]).concat(a.data.rows||[]),J.value.rows=u),J.value=J.value||a.data,q.page=a.data.pageNo+1,Q.value=a.data.pageNo>=a.data.totalPage,e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),V.value=!0;case 17:F.value=!1;case 18:case"end":return e.stop()}}),e,null,[[4,14]])})));return function(){return e.apply(this,arguments)}}(),Y=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)}}(),Z=function(e){q.page=1,q.subjectIds=e.id,J.value=null,"TEACHER"===i.platformType?(N.value={name:e.name,id:e.id},Y(e.id)):(ee.id=e.id,ee.name=e.name,j(x.SEARCH,JSON.stringify({id:e.id,name:e.name}),"set")),X(),ee.show=!1};P({onSearch:W,onComfirm:function(e){var a=Object.values(e).flat().filter(Boolean).join(",");q.albumTagIds=a,q.page=1,J.value=null,X(),K.value=!1},onComfirmSubject:Z});var $=j(x.SEARCH),ee=s({show:!1,name:$.name||"全部声部",id:$.id||""});return function(){var e=H.value&&H.value.data||[];return c(v,null,[c(b,{loading:F.value,finished:Q.value,"finished-text":J.value&&J.value.rows.length?"没有更多了":"",onLoad:X,error:V.value},{default:function(){return[!k&&c(p,{class:S},{default:function(){return[c(h,{modelValue:q.search,onSearch:W,placeholder:"请输入专辑名称 "},{left:function(){return c("div",{class:O,onClick:function(){return ee.show=!0}},["TEACHER"===i.platformType?N.value.name:ee.name,c(f,{classPrefix:"iconfont",name:"down",size:12,color:"#333"},null)])}}),c(g,{shrink:!0,class:E,lineHeight:0,"onClick-tab":function(e){q.albumTagIds=e.name,J.value=null,q.page=1,X()}},{default:function(){return[c(_,{title:"全部",name:""},null),e.map((function(e){return c(_,{title:e.name,name:e.id},null)}))]}})]}}),J.value&&J.value.rows.length?c("div",{class:C},[c(w,{list:J.value.rows,onGoto:function(e){D.push({name:"music-album-detail",params:{id:e.id}})}},null)]):!F.value&&c(d,{tips:"暂无专辑",classImgSize:"SMALL",btnStatus:!1},null)]}}),c(m,{show:ee.show,position:"bottom",round:!0,closeable:!0,"safe-area-inset-bottom":!0,onClose:function(){return ee.show=!1},onClosed:function(){return ee.show=!1}},{default:function(){return[c(y,{type:"ALBUM",searchParams:"TEACHER"===i.platformType?N.value:ee,onComfirm:Z},null)]}})])}}}))}}}))}();