index-legacy.974e0a25.js 7.0 KB

1
  1. !function(){function e(e,a,t,n,r,i,u){try{var o=e[i](u),c=o.value}catch(l){return void t(l)}o.done?a(c):Promise.resolve(c).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,c,"next",a)}function c(a){e(u,r,i,o,c,"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.fba2875c.js","./index-legacy.edb65d0c.js","./index-legacy.a7012d0a.js","./index-legacy.af00a324.js","./index-legacy.5aeab789.js","./index-legacy.fc679d65.js","./select-subject-legacy.38c54f06.js","./hooks-legacy.148eb332.js","./index-legacy.e6c10c75.js","./index-legacy.33680739.js","./use-tab-status-legacy.8752ccde.js","./use-id-legacy.db87b112.js","./use-refs-legacy.2affcb61.js","./index-legacy.7dcec7b3.js","./index-legacy.8921f068.js","./index-legacy.78361179.js","./index-legacy.1c1cdc6c.js","./index-legacy.d92f7da7.js","./icon-xin-legacy.18ed4a9d.js"],(function(e){"use strict";var t,r,i,u,o,c,l,s,f,d,m,v,b,p,g,_,h,y,j,w,x,T;return{setters:[function(e){t=e.d,r=e.w,i=e.g,u=e.S,o=e.P,c=e.O,l=e.Q,s=e.j,f=e.M,d=e.C,m=e.aR,v=e.F},function(e){b=e.S},function(e){p=e.L},function(){},function(e){g=e.T,_=e.a},function(e){h=e.S},function(e){y=e.S},function(e){j=e.a,w=e.S},function(e){x=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",E="_musicGrid_1evma_16",C="_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),I=u({id:"",name:""});if("TEACHER"===i.platformType){var N=i.user.data;I.value={name:N.defaultSubjectName||"全部声部",id:N.defaultSubject||""}}else{if(!j(w.SEARCH).id){var L=i.user.data,M=L.subjectId?Number(L.subjectId.split(",")[0]):"",z=L.subjectName?L.subjectName.split(",")[0]:"";M&&j(w.SEARCH,JSON.stringify({id:M,name:z}),"set")}}var D=o(),B=c(),G={};if(i.version&&(G.version=i.version||"",G.platform="STUDENT"===i.platformType?"ios-student":"ios-teacher"),G.myself=!1,!k)if("TEACHER"===i.platformType)G.subjectIds=I.value.id;else{var U=j(w.SEARCH);G.subjectIds=U.id}var q=l(n(n({search:B.query.search||"",albumTagIds:B.query.tagids||"",page:1},A),G)),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?(I.value={name:e.name,id:e.id},Y(e.id)):(ee.id=e.id,ee.name=e.name,j(w.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(w.SEARCH),ee=l({show:!1,name:$.name||"全部声部",id:$.id||""});return function(){var e=H.value&&H.value.data||[];return s(v,null,[s(p,{loading:F.value,finished:Q.value,"finished-text":J.value&&J.value.rows.length?"没有更多了":"",onLoad:X,error:V.value},{default:function(){return[!k&&s(b,{class:S},{default:function(){return[s(h,{modelValue:q.search,onSearch:W,placeholder:"请输入专辑名称 "},{left:function(){return s("div",{class:O,onClick:function(){return ee.show=!0}},["TEACHER"===i.platformType?I.value.name:ee.name,s(f,{classPrefix:"iconfont",name:"down",size:12,color:"#333"},null)])}}),s(g,{shrink:!0,class:C,lineHeight:0,"onClick-tab":function(e){q.albumTagIds=e.name,J.value=null,q.page=1,X()}},{default:function(){return[s(_,{title:"全部",name:""},null),e.map((function(e){return s(_,{title:e.name,name:e.id},null)}))]}})]}}),J.value&&J.value.rows.length?s("div",{class:E},[s(x,{list:J.value.rows,onGoto:function(e){D.push({name:"music-album-detail",params:{id:e.id}})}},null)]):!F.value&&s(d,{tips:"暂无专辑",classImgSize:"SMALL",btnStatus:!1},null)]}}),s(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[s(y,{type:"ALBUM",searchParams:"TEACHER"===i.platformType?I.value:ee,onComfirm:Z},null)]}})])}}}))}}}))}();