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(["./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.ae2ce69e.js","./index-legacy.77670d98.js","./index-legacy.f52c26b4.js","./use-tab-status-legacy.a19d344b.js","./index-legacy.8abefd50.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"],(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,M;return{setters:[function(e){t=e.d,a=e.P,c=e.Q,i=e.U,r=e.S,l=e.j,s=e.z,o=e.F,f=e.Z,d=e.w,v=e.be,m=e.O,p=e.M,b=e.bC},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,M=e.a},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var k=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(M,{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(k,{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(k,{defauleParams:{musicTagIds:t.value,subjectIds:u.value}},null)])])}}}))}}}))}();
|