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(["./ResizeObserver.es-legacy.44b91b4c.js","./index-legacy.4bad5b90.js","./index-legacy.c6b6f540.js","./header-legacy.85303cbf.js","./music-legacy.a18c664a.js","./hooks-legacy.5cc9e329.js","./all-search.module-legacy.af0cb82c.js","./index-legacy.9d90e2fc.js","./index-legacy.b2397ca0.js","./index-legacy.43e69380.js","./use-tab-status-legacy.d7434e0b.js","./index-legacy.3ccba950.js","./index-legacy.9d5cae73.js","./index-legacy.cf09c997.js","./use-id-legacy.ef8b5e97.js","./use-refs-legacy.d925b49f.js","./index-legacy.4be048cf.js","./index-legacy.ffa79f0a.js","./index-legacy.c8c5bc4e.js","./index-legacy.bdbc14c4.js","./index-legacy.cae55a25.js","./select-subject-legacy.757bb1cb.js","./index-legacy.9d25098b.js","./index-legacy.6ac2a941.js","./index-legacy.9696a579.js","./bg-image-legacy.44e2b3db.js","./index-legacy.0b3e1f8d.js","./icon-xin2-legacy.d521c9ab.js","./index-legacy.571708b1.js","./index-legacy.6e10cd37.js","./index-legacy.39123961.js","./index-legacy.23131301.js","./index-legacy.b257cee5.js","./index-legacy.531fc114.js"],(function(e){"use strict";var a,t,i,u,l,s,o,r,f,d,m,b,v,g,h,j,y,p,x,P,S,O,w;return{setters:[function(e){a=e.d,t=e.P,i=e.Q,u=e.S,l=e.U,s=e.V,o=e.bi,r=e.j,f=e.A,d=e.N,m=e.C,b=e.y},function(e){v=e.d},function(e){g=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(){}],execute:function(){var T=a({name:"MusicSearch",props:{defauleParams:{type:Object,default:function(){return{}}}},emits:["confirm"],setup:function(e){t();var a=i(),v=u({albumList:[],loading:!1,defauleParams:e.defauleParams}),g=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 v.loading=!0,e.prev=1,e.next=4,b.post("/api-student/music/album/list",{data:n(n({},v.defauleParams),{},{page:1,rows:3})});case 4:a=e.sent,c=a.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 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;v.defauleParams.idAndName=e,g(),null===(n=(a=y.value).onSearch)||void 0===n||n.call(a,e)};return s((function(){g(),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(){a.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(){a.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(){a.push({path:"/music-detail",query:{id:e.id}})}))},showLight:!0,lightText:v.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=v("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:A).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:A).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:A).value).onComfirmSubject)||void 0===n||n.call(a,e)},I=l(null),A=l(null),L=function(e,n){a.value=n,m.value=e};return s((function(){h.on("changeTab",L),h.on("search",j),h.on("confirm",S),h.on("confirmSubject",O)})),o((function(){h.off("changeTab",L),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("div",{class:"mt12"},[r(g,{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:A,onItemClick:function(a){n.push({path:"/music-detail",query:{id:a.id,albumId:e.params.id}})}},null)])])}}}))}}}))}();
|