1 |
- !function(){function e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function n(n){for(var a=1;a<arguments.length;a++){var u=null!=arguments[a]?arguments[a]:{};a%2?e(Object(u),!0).forEach((function(e){t(n,e,u[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(u)):e(Object(u)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(u,e))}))}return n}function t(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n,t,a,u,c,i){try{var r=e[c](i),l=r.value}catch(s){return void t(s)}r.done?n(l):Promise.resolve(l).then(a,u)}function u(e){return function(){var n=this,t=arguments;return new Promise((function(u,c){var i=e.apply(n,t);function r(e){a(i,u,c,r,l,"next",e)}function l(e){a(i,u,c,r,l,"throw",e)}r(void 0)}))}}System.register(["./ResizeObserver.es-legacy.8d60aee1.js","./index-legacy.bbc2b10e.js","./index-legacy.012a1d7c.js","./header-legacy.f5429bda.js","./music-legacy.f8020082.js","./hooks-legacy.f81762aa.js","./all-search.module-legacy.af0cb82c.js","./index-legacy.26bfaa3e.js","./index-legacy.7e047c4c.js","./index-legacy.c07bb851.js","./use-tab-status-legacy.1f35f332.js","./index-legacy.6a5df59c.js","./index-legacy.183eabe8.js","./use-id-legacy.54528695.js","./use-refs-legacy.82f31dee.js","./index-legacy.4a75d877.js","./index-legacy.c1f587d0.js","./index-legacy.610f0a70.js","./index-legacy.897f3849.js","./index-legacy.78ce4f6b.js","./select-subject-legacy.d1d95eac.js","./index-legacy.a85d660d.js","./index-legacy.87bcd48f.js","./index-legacy.4f8bc5f4.js","./bg-image-legacy.44e2b3db.js","./index-legacy.b6bb491f.js","./icon-xin2-legacy.d521c9ab.js","./index-legacy.571708b1.js","./index-legacy.6e10cd37.js"],(function(e){"use strict";var t,a,c,i,r,l,s,o,f,d,v,m,b,p,g,y,h,j,x,w,S,O,P,I,k;return{setters:[function(e){t=e.d,a=e.Q,c=e.S,i=e.V,r=e.U,l=e.j,s=e.A,o=e.F,f=e.$,d=e.y,v=e.be,m=e.P,b=e.N,p=e.bi},function(e){g=e.d},function(e){y=e.default},function(e){h=e.s,j=e.m},function(e){x=e.g},function(e){w=e.a,S=e.S},function(e){O=e.s},function(e){P=e.M},function(e){I=e.S,k=e.a},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var M=t({name:"music-list",props:{title:{type:String,default:"最热曲目"},music:{type:Array,default:function(){return[]}},defauleParams:{type:Object,default:function(){return{}}}},setup:function(e){var t=a(),m=c({musicList:[]}),b=function(e,n){var t=[];return n.forEach((function(e,n){n<=11&&t.push(e)})),t},p=function(){var t=u(regeneratorRuntime.mark((function t(){var a,u;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,d.post("/api-student/music/sheet/appMusicSheet",{data:n({},e.defauleParams)});case 3:a=t.sent,u=a.data||[],m.musicList=[b(0,u.topMusicSheet||[]),b(0,u.newMusicSheet||[]),b(0,u.hotMusicSheet||[])],t.next=10;break;case 8:t.prev=8,t.t0=t.catch(0);case 10:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(){return t.apply(this,arguments)}}();i((function(){j(),p()}));var g=r(260),y=r(!1),j=function(){y.value=!1;var e=document.body.clientWidth>750?750:document.body.clientWidth;g.value=e-120,y.value=!0};return function(){var e,n;return l(o,null,[l("div",{class:h.hotMusic},[y.value&&l(I,{showIndicators:!1,loop:!1,width:g.value},(n=e=m.musicList.map((function(e,n){return l(k,{class:h.swipeItem},{default:function(){return[l("div",{class:h.swipeChild},[l("div",{class:h.swipeTitle},[0===n&&"推荐曲目",1===n&&"最新曲目",2===n&&"最热曲目"]),l("div",{class:h.swipeContent},[e.map((function(e,n){return l("div",{class:[h.swipe,n<=2&&h.swipeTop],onClick:function(){return function(e){var n=location.origin+location.pathname+"#/music-detail?id="+e.id;v(n,(function(){t.push({path:"/music-detail",query:{id:e.id}})}))}(e)}},[l("div",{class:h.num},[n+1]),e.musicSheetName,"YES"===e.exquisiteFlag&&l("span",{class:h.hot},[s("热")])])}))])])]}})})),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!f(n)?e:{default:function(){return[e]}}))])])}}}),T=t({name:"MusicSearch",props:{defauleParams:{type:Object,default:function(){return{}}}},emits:["confirm"],setup:function(e){m();var t=a(),r=c({albumList:[]}),o=function(){var t=u(regeneratorRuntime.mark((function t(){var a,u;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,d.post("/api-student/music/album/list",{data:n(n({},e.defauleParams),{},{page:1,rows:3})});case 3:a=t.sent,u=a.data,r.albumList=u.rows||[],t.next=10;break;case 8:t.prev=8,t.t0=t.catch(0);case 10:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(){return t.apply(this,arguments)}}();return i((function(){o()})),function(){return l("div",{class:O.allSearch},[l("div",{class:O.albumSection},[l("div",{class:O.albumTitle},[l("p",null,[s("热门专辑")]),l(b,{name:"arrow",class:O.iconArrow,onClick:function(){t.push({path:"/music-album"})}},null)]),l("div",{class:O.musicGrid},[l(P,{list:r.albumList,onGoto:function(e){t.push({name:"music-album-detail",params:{id:e.id}})}},null)])]),l("div",{class:O.musicGroup},[l(M,{defauleParams:e.defauleParams},null)])])}}});e("default",t({name:"MusicSearch",emits:["confirm"],setup:function(){localStorage.setItem("behaviorId",x());var e=m();a();var n=r(e.query.keyword||""),t=r(e.query.tagids||""),u=r(),c=r(!1),s=g("music-search",[]),o=r("all"),f=w(S.SEARCH);u.value=f.id;var d=function(e){var t,a;console.log(e,"val"),n.value=e;var u=s.value.indexOf(e);u>-1&&s.value.splice(u,1),e&&(s.value.unshift(e),s.value.length=Math.min(s.value.length,10)),null===(t=(a=("album"===o.value?O:P).value).onSearch)||void 0===t||t.call(a,e)},v=function(e){var n,a,u=Object.values(e).flat().filter(Boolean).join(",");t.value=u,null===(n=(a=("album"===o.value?O:P).value).onComfirm)||void 0===n||n.call(a,e),c.value=!1},b=function(e){var n,t;u.value=e.id,null===(n=(t=("album"===o.value?O:P).value).onComfirmSubject)||void 0===n||n.call(t,e)},O=r(null),P=r(null),I=function(e){console.log(e,"val"),o.value=e};return i((function(){j.on("changeTab",I),j.on("search",d),j.on("confirm",v),j.on("confirmSubject",b),console.log(o.value,"activeTab.value")})),p((function(){j.off("changeTab",I),j.off("search",d),j.off("confirm",v),j.off("confirmSubject",b)})),function(){return l("div",{class:h.search},["all"===o.value&&l(T,{defauleParams:{albumTagIds:t.value,subjectIds:u.value}},null),"album"===o.value&&l("div",{class:h.alubmGroupSearch},[l(y,{hideSearch:!0,ref:O,defauleParams:{albumTagIds:t.value,subjectIds:u.value}},null)]),"songe"===o.value&&l("div",{class:[h.musicGroup,"mt8"]},[l(M,{defauleParams:{musicTagIds:t.value,subjectIds:u.value}},null)])])}}}))}}}))}();
|