1 |
- ;(function(){System.register(['./index-legacy.c933002c.js','./index-legacy.f7296aba.js','./index-legacy.57b067f5.js','./header-legacy.267d2c14.js','./vendor-legacy.b3aeff6a.js','./music-legacy.51a5f25f.js','./hooks-legacy.de7a9ae9.js','./index-legacy.f25f109a3.js','./index-legacy.f25f109a6.js','./index-legacy.03b70b26.js','./index-legacy.f25f109a.js','./index-legacy.f25f109a5.js','./index-legacy.e20837a9.js','./item-legacy.c76638a3.js','./index-legacy.f25f109a2.js','./favorite-legacy.9d79fe4e.js','./select-tag-legacy.a6aee03f.js','./index-legacy.f25f109a10.js','./index-legacy.f25f109a13.js','./index-legacy.f25f109a14.js','./index-legacy.6e10cd37.js','./select-subject-legacy.16fd5a68.js','./item-legacy.17a76700.js','./music-icon-legacy.a161f8f1.js','./init-user-icon-legacy.24806c87.js','./index-legacy.db5fee27.js','./index-legacy.637f3556.js','./code-down-load-legacy.6042c140.js','./logo-legacy.cf4b3bd2.js','./browser-legacy.5a92c2a9.js','./icon_teacher-legacy.e765b7f7.js','./index.module-legacy.20f161cf.js','./orderStatus-legacy.b70614f0.js','./index-legacy.c75fe8a2.js','./index-legacy.637f35562.js'],function(exports){'use strict';var useLocalStorage,AlbumList,MusicList,mitter,styles,defineComponent,useRoute,useRouter,ref,onMounted,onUnmounted,createVNode,getRandomKey,musicBuy,useSubjectId,SubjectEnum;return{setters:[function(module){useLocalStorage=module.c;},function(module){AlbumList=module["default"];},function(module){MusicList=module["default"];},function(module){mitter=module.m;styles=module.s;},function(module){defineComponent=module.d;useRoute=module.u;useRouter=module.k;ref=module.l;onMounted=module.m;onUnmounted=module.aB;createVNode=module.a;},function(module){getRandomKey=module.g;musicBuy=module.m;},function(module){useSubjectId=module.u;SubjectEnum=module.S;},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(){},function(){},function(){},function(){}],execute:function execute(){var index=exports('default',defineComponent({name:'MusicSearch',emits:['confirm'],setup:function setup(){localStorage.setItem('behaviorId',getRandomKey());var route=useRoute();useRouter();var keyword=ref(route.query.keyword||'');var tagids=ref(route.query.tagids||'');var subject=ref();var tagVisibility=ref(false);var words=useLocalStorage('music-search',[]);var activeTab=ref('songe');var getSubject=useSubjectId(SubjectEnum.SEARCH);subject.value=getSubject.id;var onSearch=function onSearch(val){var _activeRef$value$onSe,_activeRef$value;keyword.value=val;var indexOf=words.value.indexOf(val);if(indexOf>-1){words.value.splice(indexOf,1);}if(val){words.value.unshift(val);words.value.length=Math.min(words.value.length,5);}var activeRef=activeTab.value==='album'?albumList:musicList;(_activeRef$value$onSe=(_activeRef$value=activeRef.value).onSearch)===null||_activeRef$value$onSe===void 0?void 0:_activeRef$value$onSe.call(_activeRef$value,val);};var onComfirm=function onComfirm(tags){var _activeRef$value$onCo,_activeRef$value2;var data=Object.values(tags).flat().filter(Boolean).join(',');tagids.value=data;var activeRef=activeTab.value==='album'?albumList:musicList;(_activeRef$value$onCo=(_activeRef$value2=activeRef.value).onComfirm)===null||_activeRef$value$onCo===void 0?void 0:_activeRef$value$onCo.call(_activeRef$value2,tags);tagVisibility.value=false;};var onConfirmSubject=function onConfirmSubject(item){var _activeRef$value$onCo2,_activeRef$value3;subject.value=item.id;var activeRef=activeTab.value==='album'?albumList:musicList;(_activeRef$value$onCo2=(_activeRef$value3=activeRef.value).onComfirmSubject)===null||_activeRef$value$onCo2===void 0?void 0:_activeRef$value$onCo2.call(_activeRef$value3,item);};var albumList=ref(null);var musicList=ref(null);var changeTab=function changeTab(val){activeTab.value=val;};onMounted(function(){mitter.on('changeTab',changeTab);mitter.on('search',onSearch);mitter.on('confirm',onComfirm);mitter.on('confirmSubject',onConfirmSubject);});onUnmounted(function(){mitter.off('changeTab',changeTab);mitter.off('search',onSearch);mitter.off('confirm',onComfirm);mitter.off('confirmSubject',onConfirmSubject);});return function(){return createVNode("div",{"class":styles.search},[activeTab.value==='album'?createVNode(AlbumList,{"hideSearch":true,"ref":albumList,"defauleParams":{search:keyword.value,tagids:tagids.value,albumTagIds:tagids.value,subjectIds:subject.value}},null):createVNode(MusicList,{"hideSearch":true,"ref":musicList,"onItemClick":function onItemClick(item){musicBuy(item);},"defauleParams":{search:keyword.value,tagids:tagids.value,musicTagIds:tagids.value,subjectIds:subject.value}},null)]);};}}));}};});})();
|