index-legacy.4930ffc1.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.f8641610.js","./index-legacy.4ddb0119.js","./index-legacy.13f535d5.js","./index-legacy.00d337cc.js","./index-legacy.a8de4840.js","./index-legacy.e8dcdcc8.js","./select-subject-legacy.484824c5.js","./hooks-legacy.1d4168e3.js","./index-legacy.ab4325ad.js","./index-legacy.a9cc406e.js","./use-tab-status-legacy.5d29085f.js","./use-id-legacy.30c2e9af.js","./use-refs-legacy.e503281e.js","./index-legacy.fc510843.js","./index-legacy.8a3dede6.js","./index-legacy.28050159.js","./index-legacy.9d6d2a5c.js","./index-legacy.c8b60294.js","./icon-xin-legacy.18ed4a9d.js"],(function(e){"use strict";var t,r,i,u,o,c,l,s,d,f,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,c=e.P,l=e.S,s=e.i,d=e.N,f=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=c(),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=l(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=l({show:!1,name:$.name||"全部声部",id:$.id||""});return function(){var e=H.value&&H.value.data||[];return s(v,null,[s(b,{loading:F.value,finished:Q.value,"finished-text":J.value&&J.value.rows.length?"没有更多了":"",onLoad:X,error:V.value},{default:function(){return[!k&&s(p,{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?N.value.name:ee.name,s(d,{classPrefix:"iconfont",name:"down",size:12,color:"#333"},null)])}}),s(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[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:C},[s(w,{list:J.value.rows,onGoto:function(e){D.push({name:"music-album-detail",params:{id:e.id}})}},null)]):!F.value&&s(f,{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?N.value:ee,onComfirm:Z},null)]}})])}}}))}}}))}();