index-legacy.47f464f0.js 6.9 KB

1
  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 c=null!=arguments[a]?arguments[a]:{};a%2?e(Object(c),!0).forEach((function(e){t(n,e,c[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(c)):e(Object(c)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(c,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,c,u,i){try{var r=e[u](i),l=r.value}catch(s){return void t(s)}r.done?n(l):Promise.resolve(l).then(a,c)}function c(e){return function(){var n=this,t=arguments;return new Promise((function(c,u){var i=e.apply(n,t);function r(e){a(i,c,u,r,l,"next",e)}function l(e){a(i,c,u,r,l,"throw",e)}r(void 0)}))}}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.9d5cae73.js","./index-legacy.43e69380.js","./use-tab-status-legacy.d7434e0b.js","./index-legacy.3ccba950.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"],(function(e){"use strict";var t,a,u,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,u=e.S,i=e.V,r=e.U,l=e.j,s=e.A,o=e.F,f=e.$,d=e.y,v=e.bd,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=u({musicList:[]}),b=function(e,n){var t=[];return n.forEach((function(e,n){n<=11&&t.push(e)})),t},p=function(){var t=c(regeneratorRuntime.mark((function t(){var a,c;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,c=a.data||[],m.musicList=[b(0,c.topMusicSheet||[]),b(0,c.newMusicSheet||[]),b(0,c.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=u({albumList:[]}),o=function(){var t=c(regeneratorRuntime.mark((function t(){var a,c;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,c=a.data,r.albumList=c.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||""),c=r(),u=r(!1),s=g("music-search",[]),o=r("all"),f=w(S.SEARCH);c.value=f.id;var d=function(e){var t,a;console.log(e,"val"),n.value=e;var c=s.value.indexOf(e);c>-1&&s.value.splice(c,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,c=Object.values(e).flat().filter(Boolean).join(",");t.value=c,null===(n=(a=("album"===o.value?O:P).value).onComfirm)||void 0===n||n.call(a,e),u.value=!1},b=function(e){var n,t;c.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:c.value}},null),"album"===o.value&&l("div",{class:h.alubmGroupSearch},[l(y,{hideSearch:!0,ref:O,defauleParams:{albumTagIds:t.value,subjectIds:c.value}},null)]),"songe"===o.value&&l("div",{class:[h.musicGroup,"mt8"]},[l(M,{defauleParams:{musicTagIds:t.value,subjectIds:c.value}},null)])])}}}))}}}))}();