searchdetail-legacy.561fc453.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. ;(function(){function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;})),keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}return target;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}System.register(['./index-legacy.33dfe09f.js','./scrollbar.min-legacy.a13c4859.js','./index-legacy.ae6b81dc.js','./index-legacy.d8dea182.js','./index-legacy.c91236de.js','./index-legacy.d2ad69b4.js','./vendor-legacy.7f609859.js','./index-legacy.6f4cc5c9.js','./index-legacy.f7fd1a8e.js','./moreArrow-legacy.18dd0525.js','./hold-legacy.fa388436.js','./lineStart-legacy.cf9abd3c.js','./player-legacy.c7d3b4b9.js','./icon-legacy.aed5a5b3.js','./music-legacy.146bf361.js','./icon_album_active-legacy.72d719cb.js'],function(exports){'use strict';var albumItem,styles,hotSearch,silder,request,getUserType,searchInput,useSubjectId,SubjectEnum,Pagination,ColEmpty,defineComponent,reactive,onMounted,toRefs,createVNode,useRoute,ref,watch,nextTick,ElTabs,ElTabPane,albumItem$1,musicLIstItem;return{setters:[function(module){albumItem=module.a;styles=module.s;},function(module){hotSearch=module.h;},function(module){silder=module.b;request=module.r;getUserType=module.g;},function(module){searchInput=module.s;useSubjectId=module.u;SubjectEnum=module.S;},function(module){Pagination=module.P;},function(module){ColEmpty=module.C;},function(module){defineComponent=module.d;reactive=module.r;onMounted=module.o;toRefs=module.t;createVNode=module.c;useRoute=module.u;ref=module.V;watch=module.S;nextTick=module.n;ElTabs=module.C;ElTabPane=module.D;},function(module){albumItem$1=module.a;},function(module){musicLIstItem=module.m;},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function execute(){var searchAlbum=defineComponent({name:'searchdetail',components:{hotSearch:hotSearch,silder:silder,searchInput:searchInput,albumItem:albumItem,pagination:Pagination,ColEmpty:ColEmpty},setup:function setup(){var state=reactive({albumList:[],musicList:[],search:{},isshowData:false,pageInfo:{// 分页规则
  2. limit:40,// 限制显示条数
  3. page:1,// 当前页
  4. total:0,// 总条数
  5. page_size:[5,10,20,40,50]// 选择限制显示条数
  6. }});var getAlbumList=/*#__PURE__*/function(){var _ref=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee(){var res;return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.prev=0;_context.next=3;return request.post('/api-website/open/music/album/list',{data:_objectSpread(_objectSpread({albumStatus:1},state.search),{},{page:state.pageInfo.page,rows:state.pageInfo.limit}),params:{clientType:getUserType()}});case 3:res=_context.sent;state.albumList=res.data.rows;state.pageInfo.total=res.data.total;if(state.pageInfo.total==0){state.isshowData=true;}else{state.isshowData=false;}_context.next=12;break;case 9:_context.prev=9;_context.t0=_context["catch"](0);console.log(_context.t0);case 12:case"end":return _context.stop();}}},_callee,null,[[0,9]]);}));return function getAlbumList(){return _ref.apply(this,arguments);};}();var getList=function getList(val){state.search=_objectSpread(_objectSpread({},val),{},{idAndName:val.search,subjectIds:val.subject,exquisiteFlag:val.exquisiteFlag});state.pageInfo.page=1;getAlbumList();};onMounted(function(){// getAlbumList()
  7. // getMusicList()
  8. });return _objectSpread(_objectSpread({},toRefs(state)),{},{getList:getList,getAlbumList:getAlbumList});},render:function render(){var _this=this;return createVNode("div",null,[createVNode("div",null,[createVNode("div",{"class":styles.w1200},[createVNode("div",{"class":styles.section},[createVNode("div",{"class":styles.albumList},[this.albumList.map(function(item){return createVNode(albumItem,{"detail":item},null);})]),this.isshowData&&createVNode(ColEmpty,null,null)])])]),createVNode(Pagination,{"total":this.pageInfo.total,"page":this.pageInfo.page,"onUpdate:page":function onUpdatePage($event){return _this.pageInfo.page=$event;},"limit":this.pageInfo.limit,"onUpdate:limit":function onUpdateLimit($event){return _this.pageInfo.limit=$event;},"pageSizes":this.pageInfo.page_size,"pagination":this.getAlbumList},null)]);}});var searchMusic=defineComponent({name:'searchMusic',components:{hotSearch:hotSearch,silder:silder,searchInput:searchInput,albumItem:albumItem$1,musicListItem:musicLIstItem,pagination:Pagination,ColEmpty:ColEmpty},setup:function setup(){var state=reactive({musicList:[],search:{},isshowData:false,pageInfo:{// 分页规则
  9. limit:10,// 限制显示条数
  10. page:1,// 当前页
  11. total:0,// 总条数
  12. page_size:[5,10,20,40,50]// 选择限制显示条数
  13. }});// const getAlbumList = async () => {
  14. // try {
  15. // const res = await request.post('/api-website/open/music/album/list', {
  16. // data: {
  17. // albumStatus: 1,
  18. // page: 1,
  19. // rows: 10
  20. // }
  21. // })
  22. // state.albumList = res.data.rows
  23. // } catch (e) {
  24. // console.log(e)
  25. // }
  26. // }
  27. var getMusicList=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee2(){var res;return regeneratorRuntime.wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:_context2.prev=0;_context2.next=3;return request.post('/api-website/open/music/sheet/list',{data:_objectSpread(_objectSpread({albumStatus:'PASS'},state.search),{},{page:state.pageInfo.page,rows:state.pageInfo.limit,state:1}),params:{clientType:getUserType()}});case 3:res=_context2.sent;state.musicList=res.data.rows.map(function(n){if(typeof n.paymentType==="string")n.paymentType=n.paymentType.split(',');return n;});state.pageInfo.total=res.data.total;if(state.pageInfo.total==0){state.isshowData=true;}else{state.isshowData=false;}_context2.next=12;break;case 9:_context2.prev=9;_context2.t0=_context2["catch"](0);console.log(_context2.t0);case 12:case"end":return _context2.stop();}}},_callee2,null,[[0,9]]);}));return function getMusicList(){return _ref2.apply(this,arguments);};}();var getList=function getList(val){state.search={subjectIds:val.subject,musicTagIds:val.albumTagIds,exquisiteFlag:val.exquisiteFlag,idAndName:val.search};state.pageInfo.page=1;getMusicList();};onMounted(function(){// getAlbumList()
  28. // getList(state.search)
  29. });return _objectSpread(_objectSpread({},toRefs(state)),{},{getList:getList,getMusicList:getMusicList});},render:function render(){var _this2=this;return createVNode("div",null,[createVNode("div",null,[createVNode("div",{"class":styles.w1200},[createVNode("div",{"class":styles.section},[createVNode("div",{"class":styles.musicList},[this.musicList.map(function(item){return createVNode(musicLIstItem,{"item":item},null);})])])]),this.isshowData&&createVNode(ColEmpty,null,null)]),createVNode(Pagination,{"total":this.pageInfo.total,"page":this.pageInfo.page,"onUpdate:page":function onUpdatePage($event){return _this2.pageInfo.page=$event;},"limit":this.pageInfo.limit,"onUpdate:limit":function onUpdateLimit($event){return _this2.pageInfo.limit=$event;},"pageSizes":this.pageInfo.page_size,"pagination":this.getMusicList},null)]);}});var searchdetail=exports('default',defineComponent({name:'searchdetail',components:{hotSearch:hotSearch,silder:silder,searchInput:searchInput,searchAlbum:searchAlbum,searchMusic:searchMusic},setup:function setup(){var subjects=useSubjectId(SubjectEnum.SEARCH);var state=reactive({albumList:[],musicList:[],chiose:'album',searchs:{albumTagIds:'',search:'',exquisiteFlag:null,subject:subjects.id||''}});var route=useRoute();var searchAlbumRef=ref();var searchMusicRef=ref();// const getAlbumList = async () => {
  30. // try {
  31. // const res = await request.post('/api-website/open/music/album/list', {
  32. // data: {
  33. // albumStatus: 1,
  34. // page: 1,
  35. // rows: 10
  36. // }
  37. // })
  38. // state.albumList = res.data.rows
  39. // } catch (e) {
  40. // console.log(e)
  41. // }
  42. // }
  43. // const getMusicList = async () => {
  44. // try {
  45. // const res = await request.post('/api-website/open/music/sheet/list', {
  46. // data: {
  47. // albumStatus: 'PASS',
  48. // page: 1,
  49. // rows: 5,
  50. // state: 1
  51. // }
  52. // })
  53. // state.musicList = res.data.rows
  54. // } catch (e) {
  55. // console.log(e)
  56. // }
  57. // }
  58. var searchRust=function searchRust(val){console.log(val,'search');var smallTag=(val||[]).filter(function(tag){return tag<0;});var maxTag=(val||[]).filter(function(tag){return tag>0;});state.searchs.albumTagIds=maxTag.join(',');state.searchs.exquisiteFlag=null;if(smallTag[0]==-2){state.searchs.exquisiteFlag=1;}startSearch(state.searchs);};var startSearch=function startSearch(val){state.searchs=_objectSpread(_objectSpread({},state.searchs),val);search();};var search=function search(){console.log(state.searchs,'1212');if(state.chiose=='album'){searchAlbumRef.value.getList(state.searchs);}if(state.chiose=='music'){searchMusicRef.value.getList(state.searchs);}};watch(function(){return state.chiose;},function(chiose){nextTick(function(){search();});});onMounted(function(){if(route.params.search){state.searchs.search=route.params.search;}if(route.params.subject){state.searchs.subject=route.params.subject;}if(route.params.type){state.chiose=route.params.type;}nextTick(function(){search();});// getAlbumList()
  59. // getMusicList()
  60. });return _objectSpread(_objectSpread({},toRefs(state)),{},{startSearch:startSearch,searchRust:searchRust,searchAlbumRef:searchAlbumRef,searchMusicRef:searchMusicRef,search:search});},render:function render(){var _this3=this;return createVNode("div",null,[createVNode("div",{"class":""},[createVNode("div",{"class":"wall","style":{height:'60px'}},null),createVNode("div",{"class":styles.w1200},[createVNode("div",{"class":styles.section},[createVNode(searchInput,{"isWhile":true,"searchVal":_objectSpread({},this.searchs),"onUpdate:searchVal":function onUpdateSearchVal(val){console.log(val,'1212');},"type":"search","onStartSearch":function onStartSearch(val){_this3.startSearch(val);}},null),createVNode("div",{"class":styles.hotSearch},[createVNode(hotSearch,{"type":'search',"onSearchRust":function onSearchRust(val){return _this3.searchRust(val);},"onHotTag":function onHotTag(val){_this3.searchs.search=val;_this3.search();},"isChiose":true},null)]),createVNode("div",{"class":styles.myTabWrap},[createVNode(ElTabs,{"class":styles.myTab,"modelValue":this.chiose,"onUpdate:modelValue":function onUpdateModelValue($event){return _this3.chiose=$event;}},{default:function _default(){return[createVNode(ElTabPane,{"label":"专辑","name":"album"},{default:function _default(){return[_this3.chiose=='album'?createVNode(searchAlbum,{"ref":"searchAlbumRef"},null):null];}}),createVNode(ElTabPane,{"label":"乐谱","name":"music"},{default:function _default(){return[_this3.chiose=='music'?createVNode(searchMusic,{"ref":"searchMusicRef"},null):null];}})];}})])])])])]);}}));}};});})();