search-result-legacy.eff72472.js 6.4 KB

1
  1. !function(){function e(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);n&&(c=c.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),a.push.apply(a,c)}return a}function n(n){for(var c=1;c<arguments.length;c++){var t=null!=arguments[c]?arguments[c]:{};c%2?e(Object(t),!0).forEach((function(e){a(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):e(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function a(e,n,a){return n in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}function c(e,n,a,c,t,i,u){try{var l=e[i](u),s=l.value}catch(o){return void a(o)}l.done?n(s):Promise.resolve(s).then(c,t)}System.register(["./index-legacy.e29ebc18.js","./index-legacy.8ab2848d.js","./index-legacy.d8b110f0.js","./header-legacy.f97fc24e.js","./music-legacy.32ebe5b6.js","./hooks-legacy.894ea94a.js","./all-search.module-legacy.7d1b00f0.js","./index-legacy.59fabeb9.js","./index-legacy.b1759dae.js","./index-legacy.0389f2f7.js","./use-tab-status-legacy.4656d4d6.js","./index-legacy.34375aa8.js","./index-legacy.da20f473.js","./index-legacy.edf184f2.js","./use-id-legacy.6fce8b0d.js","./use-refs-legacy.023819b4.js","./index-legacy.bd25e127.js","./index-legacy.94b6d64c.js","./index-legacy.06d9aa13.js","./index-legacy.1e1ec9e6.js","./select-subject-legacy.fb1088ff.js","./index-legacy.9a585ba5.js","./index-legacy.328e8c31.js","./index-legacy.ec3a5bfc.js","./use-height-legacy.ea04c122.js","./index-legacy.2cebfa6d.js","./bg-image-legacy.44e2b3db.js","./index-legacy.0476c0b9.js","./icon-xin2-legacy.d521c9ab.js","./index-legacy.571708b1.js","./index-legacy.6e10cd37.js","./index-legacy.246e5e3c.js","./index-legacy.e79acf3d.js","./index-legacy.8a3c049a.js","./index-legacy.45174ce6.js"],(function(e){"use strict";var a,t,i,u,l,s,o,r,f,d,m,b,g,v,h,j,y,p,x,P,S,O,w;return{setters:[function(e){a=e.d,t=e.O,i=e.P,u=e.Q,l=e.S,s=e.U,o=e.bC,r=e.j,f=e.z,d=e.M,m=e.C,b=e.w},function(e){g=e.c},function(e){v=e.default},function(e){h=e.m,j=e.o,y=e.s},function(e){p=e.g},function(e){x=e.a,P=e.S},function(e){S=e.s},function(e){O=e.M},function(e){w=e.default},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var T=a({name:"MusicSearch",props:{defauleParams:{type:Object,default:function(){return{}}}},emits:["confirm"],setup:function(e){t();var a=i(),g=u({albumList:[],loading:!1,defauleParams:e.defauleParams}),v=function(){var e,a=(e=regeneratorRuntime.mark((function e(){var a,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return g.loading=!0,e.prev=1,e.next=4,b.post("/api-student/music/album/list",{data:n(n({},g.defauleParams),{},{page:1,rows:3})});case 4:a=e.sent,c=a.data,g.albumList=c.rows||[],e.next=11;break;case 9:e.prev=9,e.t0=e.catch(1);case 11:g.loading=!1;case 12:case"end":return e.stop()}}),e,null,[[1,9]])})),function(){var n=this,a=arguments;return new Promise((function(t,i){var u=e.apply(n,a);function l(e){c(u,t,i,l,s,"next",e)}function s(e){c(u,t,i,l,s,"throw",e)}l(void 0)}))});return function(){return a.apply(this,arguments)}}(),y=l(null),p=function(e){var n,a;g.defauleParams.idAndName=e,v(),null===(n=(a=y.value).onSearch)||void 0===n||n.call(a,e)};return s((function(){v(),h.on("search",p)})),o((function(){h.off("search",p)})),function(){return r("div",{class:S.allSearch},[g.albumList.length>0&&r("div",{class:[S.albumSection,S.searchAllTitle]},[r("div",{class:S.albumTitle},[r("span",null,[f("热门专辑")]),r("span",{class:S.more,onClick:function(){j("".concat(location.origin,"/tenant/#/music-album"),(function(){a.push({path:"/music-album"})}))}},[f("更多 "),r(d,{name:"arrow"},null)])]),r("div",{class:S.musicGrid},[r(O,{showLight:!0,lightText:g.defauleParams.idAndName,list:g.albumList,onGoto:function(e){j("".concat(location.origin,"/tenant/#/music-album-detail/").concat(e.id),(function(){a.push({name:"music-album-detail",params:{id:e.id}})}))}},null),g.albumList.length<=0&&!g.loading&&r(m,{tips:"暂无专辑",btnStatus:!1,classImgSize:"SMALL"},null)])]),r("div",{class:[S.albumSection,S.searchAllTitle,S.musicGroup]},[r("div",{class:S.albumTitle},[f("单曲")]),r(w,{hideSearch:!0,ref:y,onItemClick:function(e){j("".concat(location.origin,"/tenant/#/music-detail?id=").concat(e.id),(function(){a.push({path:"/music-detail",query:{id:e.id}})}))},showLight:!0,lightText:g.defauleParams.idAndName,defauleParams:n(n({},e.defauleParams),{},{idAndName:e.defauleParams.search})},null)])])}}});e("default",a({name:"MusicSearch",emits:["confirm"],setup:function(){localStorage.setItem("behaviorId",p());var e=t(),n=i(),a=l(e.query.search||""),c=l(e.query.tagids||""),u=l(),f=l(!1),d=g("music-search",[]),m=l("all"),b=x(P.SEARCH);u.value=b.id;var j=function(e){if("all"!==m.value){var n,c;a.value=e;var t=d.value.indexOf(e);t>-1&&d.value.splice(t,1),e&&(d.value.unshift(e),d.value.length=Math.min(d.value.length,10)),null===(n=("album"===m.value?I:L).value)||void 0===n||null===(c=n.onSearch)||void 0===c||c.call(n,e)}},S=function(e){var n,a,t=Object.values(e).flat().filter(Boolean).join(",");c.value=t,null===(n=(a=("album"===m.value?I:L).value).onComfirm)||void 0===n||n.call(a,e),f.value=!1},O=function(e){var n,a;u.value=e.id,null===(n=(a=("album"===m.value?I:L).value).onComfirmSubject)||void 0===n||n.call(a,e)},I=l(null),L=l(null),A=function(e,n){a.value=n,m.value=e};return s((function(){h.on("changeTab",A),h.on("search",j),h.on("confirm",S),h.on("confirmSubject",O)})),o((function(){h.off("changeTab",A),h.off("search",j),h.off("confirm",S),h.off("confirmSubject",O)})),function(){return r("div",{class:y.search},["all"===m.value&&r(T,{defauleParams:{idAndName:a.value,albumTagIds:c.value,subjectIds:u.value}},null),"album"===m.value&&r(v,{hideSearch:!0,showLight:!0,lightText:a.value,ref:I,defauleParams:{search:a.value,albumTagIds:c.value,subjectIds:u.value}},null),"songe"===m.value&&r("div",{class:y.musicGroup},[r(w,{hideSearch:!0,showLight:!0,lightText:a.value,defauleParams:{idAndName:a.value,albumTagIds:c.value,subjectIds:u.value},ref:L,onItemClick:function(a){n.push({path:"/music-detail",query:{id:a.id,albumId:e.params.id}})}},null)])])}}}))}}}))}();