searchAlbum-legacy.c87dfce7.js 3.5 KB

1
  1. !function(){function e(e,n,a,t,c,u,i){try{var s=e[u](i),o=s.value}catch(r){return void a(r)}s.done?n(o):Promise.resolve(o).then(t,c)}System.register(["./ResizeObserver.es-legacy.8d60aee1.js","./header-legacy.f5429bda.js","./music-legacy.f8020082.js","./hooks-legacy.f81762aa.js","./index-legacy.c07bb851.js","./index-legacy.34b0986d.js","./index-legacy.a85d660d.js","./index-legacy.6a5df59c.js","./index-legacy.7e047c4c.js","./index-legacy.183eabe8.js","./use-id-legacy.54528695.js","./use-tab-status-legacy.1f35f332.js","./use-refs-legacy.82f31dee.js","./index-legacy.c1f587d0.js","./index-legacy.610f0a70.js","./index-legacy.571708b1.js","./index-legacy.897f3849.js","./index-legacy.78ce4f6b.js","./index-legacy.bbc2b10e.js","./index-legacy.6e10cd37.js","./select-subject-legacy.d1d95eac.js","./index-legacy.4f8bc5f4.js","./index-legacy.87bcd48f.js","./icon-xin2-legacy.d521c9ab.js","./index-legacy.4a75d877.js"],(function(n){"use strict";var a,t,c,u,i,s,o,r,l,f,d,v,g,y,m,h,b,j;return{setters:[function(e){a=e.d,t=e.P,c=e.Q,u=e.U,i=e.S,s=e.V,o=e.bi,r=e.j,l=e.be,f=e.C,d=e.y},function(e){v=e.m,g=e.s},function(e){y=e.g},function(e){m=e.a,h=e.S},function(e){b=e.L},function(e){j=e.S},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){n("default",a({name:"MusicSearch",emits:["confirm"],setup:function(){localStorage.setItem("behaviorId",y());var n=t(),a=c(),p=u(n.query.keyword||""),x=u(),w=m(h.SEARCH);x.value=w.id;var S=function(e){p.value=e,k.value&&(k.value.rows=[]),I.name=e,I.page=1,R()},I=i({name:n.query.search||"",rows:20,page:1}),k=u(null),A=u(!1),N=u(!1),P=u(!1),R=function(){var n,a=(n=regeneratorRuntime.mark((function e(){var n,a,t,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!A.value){e.next=2;break}return e.abrupt("return");case 2:return A.value=!0,P.value=!1,e.prev=4,e.next=7,d.post("/api-student/music/sheet/searchTenant",{data:I});case 7:n=e.sent,k.value&&(t=((null===(a=k.value)||void 0===a?void 0:a.rows)||[]).concat(n.data.music.rows||[]),k.value.rows=t),k.value=k.value||n.data.music,(c=k.value.rows||[]).forEach((function(e){p.value&&(e.musicSheetName=e.musicSheetName.replace(p.value,'<span style="color: #FE2451">'.concat(p.value,"</span>")))})),k.value.rows=c,I.page=n.data.music.pageNo+1,N.value=n.data.music.pageNo>=n.data.music.totalPage,e.next=20;break;case 17:e.prev=17,e.t0=e.catch(4),P.value=!0;case 20:A.value=!1;case 21:case"end":return e.stop()}}),e,null,[[4,17]])})),function(){var a=this,t=arguments;return new Promise((function(c,u){var i=n.apply(a,t);function s(n){e(i,c,u,s,o,"next",n)}function o(n){e(i,c,u,s,o,"throw",n)}s(void 0)}))});return function(){return a.apply(this,arguments)}}();return s((function(){v.on("search",S),R()})),o((function(){v.off("search",S)})),function(){return r("div",{class:[g.search,g.searchAlbum]},[k.value&&k.value.rows.length?r(b,{finished:N.value,"finished-text":(k.value&&k.value.rows.length,""),onLoad:R,error:P.value,immediateCheck:!1},{default:function(){return[r(j,{showTitleImg:!0,list:k.value.rows,onDetail:function(e){var n=location.origin+location.pathname+"#/music-detail?id="+e.id+"&tenantAlbumId="+e.tenantAlbumId+"&type=search";l(n,(function(){a.push({path:"/music-detail",query:{id:e.id,tenantAlbumId:e.tenantAlbumId,type:"search"}})}))}},null)]}}):!A.value&&r(f,{tips:"暂无曲目",btnStatus:!1},null)])}}}))}}}))}();