search-result-legacy.3990297c.js 6.4 KB

1
  1. !function(){function e(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);a&&(c=c.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,c)}return n}function a(a){for(var c=1;c<arguments.length;c++){var t=null!=arguments[c]?arguments[c]:{};c%2?e(Object(t),!0).forEach((function(e){n(a,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):e(Object(t)).forEach((function(e){Object.defineProperty(a,e,Object.getOwnPropertyDescriptor(t,e))}))}return a}function n(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function c(e,a,n,c,t,i,u){try{var l=e[i](u),s=l.value}catch(o){return void n(o)}l.done?a(s):Promise.resolve(s).then(c,t)}System.register(["./index-legacy.b903c881.js","./index-legacy.8e85fa65.js","./index-legacy.fc0c24d8.js","./header-legacy.858f3a69.js","./music-legacy.7769391f.js","./hooks-legacy.84a774a1.js","./all-search.module-legacy.af0cb82c.js","./index-legacy.9eaf8265.js","./index-legacy.8af236a7.js","./index-legacy.77670d98.js","./index-legacy.f52c26b4.js","./use-tab-status-legacy.a19d344b.js","./index-legacy.8abefd50.js","./index-legacy.ae2ce69e.js","./index-legacy.ba78f33e.js","./use-id-legacy.29724920.js","./use-refs-legacy.14daae14.js","./index-legacy.5b93d63d.js","./index-legacy.3fd38cb5.js","./index-legacy.b7f666cc.js","./index-legacy.3e4ae683.js","./index-legacy.e9e6da38.js","./select-subject-legacy.b6a4ee6e.js","./index-legacy.857a8bc7.js","./index-legacy.885c229f.js","./index-legacy.909b3c1c.js","./bg-image-legacy.44e2b3db.js","./index-legacy.1b471fb9.js","./icon-xin2-legacy.d521c9ab.js","./index-legacy.571708b1.js","./index-legacy.6e10cd37.js","./index-legacy.a3b9d61a.js","./index-legacy.fea60f22.js","./index-legacy.c28809c6.js","./index-legacy.1c1000df.js"],(function(e){"use strict";var n,t,i,u,l,s,o,r,f,d,m,g,v,b,h,j,y,p,x,P,S,O,w;return{setters:[function(e){n=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,g=e.w},function(e){v=e.d},function(e){b=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=n({name:"MusicSearch",props:{defauleParams:{type:Object,default:function(){return{}}}},emits:["confirm"],setup:function(e){t();var n=i(),v=u({albumList:[],loading:!1,defauleParams:e.defauleParams}),b=function(){var e,n=(e=regeneratorRuntime.mark((function e(){var n,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v.loading=!0,e.prev=1,e.next=4,g.post("/api-student/music/album/list",{data:a(a({},v.defauleParams),{},{page:1,rows:3})});case 4:n=e.sent,c=n.data,v.albumList=c.rows||[],e.next=11;break;case 9:e.prev=9,e.t0=e.catch(1);case 11:v.loading=!1;case 12:case"end":return e.stop()}}),e,null,[[1,9]])})),function(){var a=this,n=arguments;return new Promise((function(t,i){var u=e.apply(a,n);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 n.apply(this,arguments)}}(),y=l(null),p=function(e){var a,n;v.defauleParams.idAndName=e,b(),null===(a=(n=y.value).onSearch)||void 0===a||a.call(n,e)};return s((function(){b(),h.on("search",p)})),o((function(){h.off("search",p)})),function(){return r("div",{class:S.allSearch},[v.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(){n.push({path:"/music-album"})}))}},[f("更多 "),r(d,{name:"arrow"},null)])]),r("div",{class:S.musicGrid},[r(O,{showLight:!0,lightText:v.defauleParams.idAndName,list:v.albumList,onGoto:function(e){j("".concat(location.origin,"/tenant/#/music-album-detail/").concat(e.id),(function(){n.push({name:"music-album-detail",params:{id:e.id}})}))}},null),v.albumList.length<=0&&!v.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(){n.push({path:"/music-detail",query:{id:e.id}})}))},showLight:!0,lightText:v.defauleParams.idAndName,defauleParams:a(a({},e.defauleParams),{},{idAndName:e.defauleParams.search})},null)])])}}});e("default",n({name:"MusicSearch",emits:["confirm"],setup:function(){localStorage.setItem("behaviorId",p());var e=t(),a=i(),n=l(e.query.search||""),c=l(e.query.tagids||""),u=l(),f=l(!1),d=v("music-search",[]),m=l("all"),g=x(P.SEARCH);u.value=g.id;var j=function(e){if("all"!==m.value){var a,c;n.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===(a=("album"===m.value?I:L).value)||void 0===a||null===(c=a.onSearch)||void 0===c||c.call(a,e)}},S=function(e){var a,n,t=Object.values(e).flat().filter(Boolean).join(",");c.value=t,null===(a=(n=("album"===m.value?I:L).value).onComfirm)||void 0===a||a.call(n,e),f.value=!1},O=function(e){var a,n;u.value=e.id,null===(a=(n=("album"===m.value?I:L).value).onComfirmSubject)||void 0===a||a.call(n,e)},I=l(null),L=l(null),A=function(e,a){n.value=a,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:n.value,albumTagIds:c.value,subjectIds:u.value}},null),"album"===m.value&&r("div",{class:"mt12"},[r(b,{hideSearch:!0,showLight:!0,lightText:n.value,ref:I,defauleParams:{search:n.value,albumTagIds:c.value,subjectIds:u.value}},null)]),"songe"===m.value&&r("div",{class:[y.musicGroup]},[r(w,{hideSearch:!0,showLight:!0,lightText:n.value,defauleParams:{idAndName:n.value,albumTagIds:c.value,subjectIds:u.value},ref:L,onItemClick:function(n){a.push({path:"/music-detail",query:{id:n.id,albumId:e.params.id}})}},null)])])}}}))}}}))}();