index-legacy.012a1d7c.js 9.1 KB

1
  1. !function(){function e(e,t,a,n,r,i,o){try{var c=e[i](o),l=c.value}catch(u){return void a(u)}c.done?t(l):Promise.resolve(l).then(n,r)}function t(t){return function(){var a=this,n=arguments;return new Promise((function(r,i){var o=t.apply(a,n);function c(t){e(o,r,i,c,l,"next",t)}function l(t){e(o,r,i,c,l,"throw",t)}c(void 0)}))}}function a(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var i=document.createElement("style");i.innerHTML="._memberHeader_12ffq_1{position:relative;z-index:1;background:url(./assets/bg-image.e89554da.png) no-repeat top center;background-size:100% 9.22667rem}._headerImg_12ffq_7{position:fixed!important;left:0;top:0;width:100%;height:9.22667rem;-o-object-fit:cover;object-fit:cover;filter:blur(.26667rem)}._headerContent_12ffq_16 .van-search{padding-bottom:0}._headerContent_12ffq_16 .van-search__content{background:rgba(255,255,255,.5)!important}._headerContent_12ffq_16 .van-search__content input::-moz-placeholder{color:rgba(0,0,0,.4)!important}._headerContent_12ffq_16 .van-search__content input::placeholder{color:rgba(0,0,0,.4)!important}._headerContent_12ffq_16 .van-search__content input,._headerContent_12ffq_16 .van-search__content .van-field__clear{color:rgba(0,0,0,.4)!important}._headerContent_12ffq_16 .van-dropdown-menu__bar{background-color:transparent;box-shadow:none;padding-right:.4rem}._headerContent_12ffq_16 .van-dropdown-menu__title{padding-left:0}._headerContent_12ffq_16 .van-dropdown-menu__title:after{border-color:transparent transparent rgba(0,0,0,.4) rgba(0,0,0,.4)}._headerContent_12ffq_16 .van-dropdown-item__content{border-radius:0 0 .53333rem .53333rem}._headerContent_12ffq_16 .van-dropdown-menu__title--active{color:#fe2451}._headerContent_12ffq_16 .van-dropdown-menu__title--down:after{border-color:transparent transparent #FE2451 #FE2451}._sticky_12ffq_51 .van-sticky--fixed{box-shadow:.26667rem .26667rem .26667rem var(--box-shadow-color)}._label_12ffq_54{margin-right:.21333rem;font-size:.37333rem}._label_12ffq_54 .van-list__loading,._label_12ffq_54 .van-list__finished-text,._label_12ffq_54 .van-list__error-text{width:100%}._label_12ffq_54 .iconfont-down{margin-left:.10667rem}._musicGrid_12ffq_66{margin:.21333rem .32rem}._tagTabs_12ffq_69 .van-tabs__nav{background-color:transparent;padding:0!important;margin:0 .4rem}._tagTabs_12ffq_69 .van-tab{font-size:.42667rem;font-weight:700}._tagTabs_12ffq_69 .van-tab--shrink{padding:0;margin:.26667rem 0;display:inline-block;font-size:.37333rem;background:transparent;border-radius:.37333rem;line-height:.69333rem;padding:0 .32rem;color:rgba(0,0,0,.4)}._tagTabs_12ffq_69 .van-tab--active{background:#FF699E;color:#fff}._tagTabs_12ffq_69 .van-tab--active .van-tab__text{z-index:1}._tagTabs_12ffq_69 .van-tabs__line{height:0}\n",document.head.appendChild(i),System.register(["./ResizeObserver.es-legacy.8d60aee1.js","./index-legacy.c07bb851.js","./index-legacy.6a5df59c.js","./index-legacy.7e047c4c.js","./index-legacy.183eabe8.js","./index-legacy.4a75d877.js","./index-legacy.c1f587d0.js","./index-legacy.610f0a70.js","./index-legacy.897f3849.js","./select-subject-legacy.d1d95eac.js","./hooks-legacy.f81762aa.js","./index-legacy.26bfaa3e.js","./index-legacy.bbc2b10e.js","./index-legacy.87bcd48f.js","./index-legacy.4f8bc5f4.js","./bg-image-legacy.44e2b3db.js","./use-tab-status-legacy.1f35f332.js","./use-id-legacy.54528695.js","./use-refs-legacy.82f31dee.js","./index-legacy.78ce4f6b.js","./index-legacy.a85d660d.js","./index-legacy.b6bb491f.js","./icon-xin2-legacy.d521c9ab.js"],(function(e){"use strict";var a,r,i,o,c,l,u,s,f,d,_,m,p,b,g,v,h,y,j,x,w,q,C,T,S;return{setters:[function(e){a=e.d,r=e.U,i=e.y,o=e.g,c=e.Q,l=e.P,u=e.S,s=e.j,f=e.F,d=e.C},function(e){_=e.L},function(){},function(){},function(e){m=e.T,p=e.a},function(e){b=e.I},function(e){g=e.D,v=e.a},function(){},function(e){h=e.S},function(e){y=e.S},function(e){j=e.a,x=e.S},function(e){w=e.M},function(e){q=e.c},function(e){C=e.C},function(e){T=e.T},function(e){S=e.b},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var k={memberHeader:"_memberHeader_12ffq_1",headerImg:"_headerImg_12ffq_7",headerContent:"_headerContent_12ffq_16",sticky:"_sticky_12ffq_51",label:"_label_12ffq_54",musicGrid:"_musicGrid_12ffq_66",tagTabs:"_tagTabs_12ffq_69"};e("default",a({name:"Album",props:{hideSearch:{type:Boolean,default:!1},defauleParams:{type:Object,default:function(){return{}}},showLight:{type:Boolean,default:!1},lightText:{type:String,default:""}},setup:function(e,a){var E=e.hideSearch,O=e.defauleParams,A=e.showLight,H=e.lightText,R=a.expose,I=r(H),P=q(i(o.platformApi+"/MusicTag/tree",{params:{type:"ALBUM"}}),null),L=(P.isLoading,P.state),N=r({id:"",name:""});if("TEACHER"===o.platformType){var z=o.user.data;N.value={name:z.defaultSubjectName||"全部声部",id:z.defaultSubject||""}}else{if(!j(x.SEARCH).id){var D=o.user.data,F=D.subjectId?Number(D.subjectId.split(",")[0]):"",M=D.subjectName?D.subjectName.split(",")[0]:"";F&&j(x.SEARCH,JSON.stringify({id:F,name:M}),"set")}}var B=c(),G=l(),U={};if(o.version&&(U.version=o.version||"",U.platform="STUDENT"===o.platformType?"ios-student":"ios-teacher"),U.myself=!1,!E)if("TEACHER"===o.platformType)U.subjectIds=N.value.id;else{var J=j(x.SEARCH);U.subjectIds=J.id}var Q=u(n(n({search:G.query.search||"",albumTagIds:G.query.tagids||"",page:1},O),U)),V=r(null),K=r(!1),W=r(!1),X=r(!1),Y=r(!1),Z=function(e){Q.page=1,Q.search=e,I.value=e,V.value=null,$()},$=function(){var e=t(regeneratorRuntime.mark((function e(){var t,a,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!K.value){e.next=2;break}return e.abrupt("return");case 2:return K.value=!0,X.value=!1,e.prev=4,e.next=7,i.post("/music/album/list",{prefix:"TEACHER"===o.platformType?"/api-teacher":"/api-student",data:n(n({},Q),{},{idAndName:I.value})});case 7:t=e.sent,V.value&&(r=((null===(a=V.value)||void 0===a?void 0:a.rows)||[]).concat(t.data.rows||[]),V.value.rows=r),V.value=V.value||t.data,Q.page=t.data.pageNo+1,W.value=t.data.pageNo>=t.data.totalPage,e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),X.value=!0;case 17:K.value=!1;case 18:case"end":return e.stop()}}),e,null,[[4,14]])})));return function(){return e.apply(this,arguments)}}(),ee=function(){var e=t(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i.post("/api-teacher/teacher/defaultSubject",{params:{subjectId:t}});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(t){return e.apply(this,arguments)}}(),te=r(),ae=function(e){Q.page=1,Q.subjectIds=e.id,te.value.toggle(),V.value=null,"TEACHER"===o.platformType?(N.value={name:e.name,id:e.id},ee(e.id)):(re.id=e.id,re.name=e.name,j(x.SEARCH,JSON.stringify({id:e.id,name:e.name}),"set")),$(),re.show=!1};R({onSearch:Z,onComfirm:function(e){var t=Object.values(e).flat().filter(Boolean).join(",");Q.albumTagIds=t,Q.page=1,V.value=null,$(),Y.value=!1},onComfirmSubject:ae});var ne=j(x.SEARCH),re=u({show:!1,name:ne.name||"全部声部",id:ne.id||""});return function(){var e=L.value&&L.value.data||[];return s("div",null,[s(_,{finished:W.value,"finished-text":V.value&&V.value.rows.length?" ":"",onLoad:$,error:X.value},{default:function(){return[!E&&s(f,null,[s(T,{position:"top"},{default:function(){return[s(C,{class:k.memberHeader,background:"transparent",border:!1,isFixed:!1,color:"#131415"},{default:function(){return s("div",{class:k.headerContent},[s(h,{type:"tenant",modelValue:Q.search,onSearch:Z,placeholder:"请输入专辑名称 ",background:"transparent"},{left:function(){return s(g,null,{default:function(){return[s(v,{titleClass:k.titleActive,title:"筛选",ref:te},{default:function(){return[s(y,{type:"ALBUM",isReset:!0,searchParams:"TEACHER"===o.platformType?N.value:re,onComfirm:ae},null)]}})]}})}}),s(m,{shrink:!0,class:k.tagTabs,lineHeight:0,"onClick-tab":function(e){Q.albumTagIds=e.name,V.value=null,Q.page=1,$()}},{default:function(){return[s(p,{title:"全部",name:""},null),e.map((function(e){return s(p,{title:e.name,name:e.id},null)}))]}})])}})]}}),s(b,{class:k.headerImg,src:S},null)]),V.value&&V.value.rows.length?s("div",{class:k.musicGrid},[s(w,{showLight:A,lightText:I.value,list:V.value.rows,onGoto:function(e){var t="TEACHER"===o.platformType?N.value:re;console.log(t),B.push({name:"music-album-detail",params:{id:e.id},query:{subjectId:t.id,subjectName:t.name}})}},null)]):!K.value&&s("div",{style:"height: calc(100vh - var(--header-height));display: flex;align-items: center;"},[s(d,{tips:"暂无专辑",classImgSize:"SMALL",btnStatus:!1},null)])]}})])}}}))}}}))}();