searchdetail-legacy.76bc91ff.js 11 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.b9d458bb.js','./scrollbar.min-legacy.b3bf15d4.js','./index-legacy.902a9e5a.js','./index-legacy.d4b65662.js','./index-legacy.01d7405a.js','./index-legacy.5669f9d5.js','./vendor-legacy.b19481d4.js','./index-legacy.bbf2319e.js','./index-legacy.e5a374bd.js','./moreArrow-legacy.12b046be.js','./hold-legacy.fa388436.js','./lineStart-legacy.660bfbea.js','./player-legacy.c7d3b4b9.js','./icon-legacy.aed5a5b3.js','./music-legacy.146bf361.js','./lineStart-legacy.f91a0e0f.js'],function(exports){'use strict';var albumItem,styles,hotSearch,silder,request,searchInput,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;},function(module){searchInput=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})});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});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})});case 3:res=_context2.sent;state.musicList=res.data.rows;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,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 state=reactive({albumList:[],musicList:[],chiose:'album',searchs:{albumTagIds:'',search:'',subject:''}});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){state.searchs.albumTagIds=val.join(',');startSearch(state.searchs);};var startSearch=function startSearch(val){state.searchs=_objectSpread(_objectSpread({},state.searchs),val);search();};var search=function search(){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){console.log(chiose);nextTick(function(){search();});});onMounted(function(){console.log(route.name);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),"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];}})];}})])])])])]);}}));}};});})();