index-legacy.046d1e8b.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 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.9ef5ac8c.js","./index-legacy.91eef022.js","./index-legacy.5f9a3a4a.js","./header-legacy.85301a27.js","./music-legacy.025f1fa2.js","./hooks-legacy.b4b15558.js","./all-search.module-legacy.af0cb82c.js","./index-legacy.9ccb644c.js","./index-legacy.68eb7f39.js","./index-legacy.63f64e9b.js","./use-tab-status-legacy.257600f9.js","./index-legacy.49dc34f1.js","./index-legacy.75e14135.js","./use-id-legacy.4538a8e2.js","./use-refs-legacy.c67c62a4.js","./index-legacy.8802e914.js","./index-legacy.d0f09d75.js","./index-legacy.e9381954.js","./index-legacy.46228add.js","./index-legacy.b5b73462.js","./select-subject-legacy.2661617d.js","./index-legacy.31c9aada.js","./index-legacy.402479d8.js","./index-legacy.3c7372ae.js","./bg-image-legacy.44e2b3db.js","./index-legacy.75981fe0.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,p,b,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.bg,m=e.P,p=e.N,b=e.bE},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:[]}),p=function(e,n){var t=[];return n.forEach((function(e,n){n<=11&&t.push(e)})),t},b=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=[p(0,u.topMusicSheet||[]),p(0,u.newMusicSheet||[]),p(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(),b()}));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(p,{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},p=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",p),console.log(o.value,"activeTab.value")})),b((function(){j.off("changeTab",I),j.off("search",d),j.off("confirm",v),j.off("confirmSubject",p)})),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)])])}}}))}}}))}();