searchdetail.ee4ec1a5.js 5.3 KB

1
  1. var C=Object.defineProperty,E=Object.defineProperties;var P=Object.getOwnPropertyDescriptors;var L=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var x=(s,a,i)=>a in s?C(s,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):s[a]=i,l=(s,a)=>{for(var i in a||(a={}))V.call(a,i)&&x(s,i,a[i]);if(L)for(var i of L(a))N.call(a,i)&&x(s,i,a[i]);return s},r=(s,a)=>E(s,P(a));import{a as S,s as o}from"./index.3604a4c2.js";import{h as m}from"./scrollbar.min.4057caa3.js";import{b as d,r as T,g as v}from"./index.6fc5f983.js";import{s as p,u as H,S as W}from"./index.300b681a.js";import{P as h}from"./index.404471e8.js";import{C as g}from"./index.ba731085.js";import{d as b,r as I,o as j,t as y,c as e,u as k,a3 as A,a0 as O,n as R,O as $,P as q}from"./vendor.63aa8b19.js";import{a as B}from"./index.c070ae1c.js";import{m as D}from"./index.6af6c3f0.js";import"./moreArrow.9485fe74.js";import"./hold.c2fff6ac.js";import"./lineStart.9340661e.js";import"./player.8b5ee2bb.js";import"./icon.6e6f91da.js";import"./music.f2b8674a.js";import"./icon_album_active.66672e6b.js";var F=b({name:"searchdetail",components:{hotSearch:m,silder:d,searchInput:p,albumItem:S,pagination:h,ColEmpty:g},setup(){const s=I({albumList:[],musicList:[],search:{},isshowData:!1,pageInfo:{limit:40,page:1,total:0,page_size:[5,10,20,40,50]}}),a=async()=>{try{const t=await T.post("/api-website/open/music/album/list",{data:r(l({albumStatus:1},s.search),{page:s.pageInfo.page,rows:s.pageInfo.limit}),params:{clientType:v()}});s.albumList=t.data.rows,s.pageInfo.total=t.data.total,s.pageInfo.total==0?s.isshowData=!0:s.isshowData=!1}catch(t){console.log(t)}},i=t=>{s.search=r(l({},t),{idAndName:t.search,subjectIds:t.subject,exquisiteFlag:t.exquisiteFlag}),s.pageInfo.page=1,a()};return j(()=>{}),r(l({},y(s)),{getList:i,getAlbumList:a})},render(){return e("div",null,[e("div",null,[e("div",{class:o.w1200},[e("div",{class:o.section},[e("div",{class:o.albumList},[this.albumList.map(s=>e(S,{detail:s},null))]),this.isshowData&&e(g,null,null)])])]),e(h,{total:this.pageInfo.total,page:this.pageInfo.page,"onUpdate:page":s=>this.pageInfo.page=s,limit:this.pageInfo.limit,"onUpdate:limit":s=>this.pageInfo.limit=s,pageSizes:this.pageInfo.page_size,pagination:this.getAlbumList},null)])}}),M=b({name:"searchMusic",components:{hotSearch:m,silder:d,searchInput:p,albumItem:B,musicListItem:D,pagination:h,ColEmpty:g},setup(){const s=I({musicList:[],search:{},isshowData:!1,pageInfo:{limit:10,page:1,total:0,page_size:[5,10,20,40,50]}}),a=async()=>{try{const t=await T.post("/api-website/open/music/sheet/list",{data:r(l({albumStatus:"PASS"},s.search),{page:s.pageInfo.page,rows:s.pageInfo.limit,state:1}),params:{clientType:v()}});s.musicList=t.data.rows.map(c=>(typeof c.paymentType=="string"&&(c.paymentType=c.paymentType.split(",")),c)),s.pageInfo.total=t.data.total,s.pageInfo.total==0?s.isshowData=!0:s.isshowData=!1}catch(t){console.log(t)}},i=t=>{s.search={subjectIds:t.subject,musicTagIds:t.albumTagIds,exquisiteFlag:t.exquisiteFlag,idAndName:t.search},s.pageInfo.page=1,a()};return j(()=>{}),r(l({},y(s)),{getList:i,getMusicList:a})},render(){return e("div",null,[e("div",null,[e("div",{class:o.w1200},[e("div",{class:o.section},[e("div",{class:o.musicList},[this.musicList.map(s=>e(D,{item:s},null))])])]),this.isshowData&&e(g,null,null)]),e(h,{total:this.pageInfo.total,page:this.pageInfo.page,"onUpdate:page":s=>this.pageInfo.page=s,limit:this.pageInfo.limit,"onUpdate:limit":s=>this.pageInfo.limit=s,pageSizes:this.pageInfo.page_size,pagination:this.getMusicList},null)])}}),us=b({name:"searchdetail",components:{hotSearch:m,silder:d,searchInput:p,searchAlbum:F,searchMusic:M},setup(){const s=H(W.SEARCH),a=I({albumList:[],musicList:[],chiose:"album",searchs:{albumTagIds:"",search:"",exquisiteFlag:null,subject:s.id||""}}),i=k(),t=A(),c=A(),U=n=>{console.log(n,"search");const z=(n||[]).filter(f=>f<0),_=(n||[]).filter(f=>f>0);a.searchs.albumTagIds=_.join(","),a.searchs.exquisiteFlag=null,z[0]==-2&&(a.searchs.exquisiteFlag=1),w(a.searchs)},w=n=>{a.searchs=l(l({},a.searchs),n),u()},u=()=>{console.log(a.searchs,"1212"),a.chiose=="album"&&t.value.getList(a.searchs),a.chiose=="music"&&c.value.getList(a.searchs)};return O(()=>a.chiose,n=>{R(()=>{u()})}),j(()=>{i.params.search&&(a.searchs.search=i.params.search),i.params.subject&&(a.searchs.subject=i.params.subject),i.params.type&&(a.chiose=i.params.type),R(()=>{u()})}),r(l({},y(a)),{startSearch:w,searchRust:U,searchAlbumRef:t,searchMusicRef:c,search:u})},render(){return e("div",null,[e("div",{class:""},[e("div",{class:"wall",style:{height:"60px"}},null),e("div",{class:o.w1200},[e("div",{class:o.section},[e(p,{isWhile:!0,searchVal:l({},this.searchs),"onUpdate:searchVal":s=>{console.log(s,"1212")},type:"search",onStartSearch:s=>{this.startSearch(s)}},null),e("div",{class:o.hotSearch},[e(m,{type:"search",onSearchRust:s=>this.searchRust(s),onHotTag:s=>{this.searchs.search=s,this.search()},isChiose:!0},null)]),e("div",{class:o.myTabWrap},[e($,{class:o.myTab,modelValue:this.chiose,"onUpdate:modelValue":s=>this.chiose=s},{default:()=>[e(q,{label:"\u4E13\u8F91",name:"album"},{default:()=>[this.chiose=="album"?e(F,{ref:"searchAlbumRef"},null):null]}),e(q,{label:"\u4E50\u8C31",name:"music"},{default:()=>[this.chiose=="music"?e(M,{ref:"searchMusicRef"},null):null]})]})])])])])])}});export{us as default};