import{a as I,s as i}from"./index.e77a2422.js";import{h as n}from"./scrollbar.min.f2e6536a.js";import{d as h,Q as p,r as g,o as f,$ as d,c as a,b as j,e as A,f as w,w as D,n as L,aO as M,aP as v}from"./index.25c29239.js";import{s as r}from"./index.8957f1c0.js";import{P as m}from"./index.d8faddb1.js";import{C as u}from"./index.98009975.js";import{a as z}from"./index.acd95b18.js";import{m as S}from"./index.f50f3b89.js";import"./moreArrow.9742bd18.js";import"./index2.32ff5740.js";import"./index2.fcf14428.js";import"./hold.1dbe0dcf.js";import"./lineStart.9115d075.js";import"./player.ee188b71.js";import"./icon.10668985.js";import"./music.a3f72636.js";import"./lineStart.aab24801.js";const y=h({name:"searchdetail",components:{hotSearch:n,silder:p,searchInput:r,albumItem:I,pagination:m,ColEmpty:u},setup(){const s=g({albumList:[],musicList:[],search:{},isshowData:!1,pageInfo:{limit:40,page:1,total:0,page_size:[5,10,20,40,50]}}),t=async()=>{try{const e=await j.post("/api-website/open/music/album/list",{data:{albumStatus:1,...s.search,page:s.pageInfo.page,rows:s.pageInfo.limit}});s.albumList=e.data.rows,s.pageInfo.total=e.data.total,s.pageInfo.total==0?s.isshowData=!0:s.isshowData=!1}catch(e){console.log(e)}},o=e=>{s.search={...e,idAndName:e.search,subjectIds:e.subject},s.pageInfo.page=1,t()};return f(()=>{}),{...d(s),getList:o,getAlbumList:t}},render(){return a("div",null,[a("div",null,[a("div",{class:i.w1200},[a("div",{class:i.section},[a("div",{class:i.albumList},[this.albumList.map(s=>a(I,{detail:s},null))]),this.isshowData&&a(u,null,null)])])]),a(m,{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)])}}),T=h({name:"searchMusic",components:{hotSearch:n,silder:p,searchInput:r,albumItem:z,musicListItem:S,pagination:m,ColEmpty:u},setup(){const s=g({musicList:[],search:{},isshowData:!1,pageInfo:{limit:10,page:1,total:0,page_size:[5,10,20,40,50]}}),t=async()=>{try{const e=await j.post("/api-website/open/music/sheet/list",{data:{albumStatus:"PASS",...s.search,page:s.pageInfo.page,rows:s.pageInfo.limit,state:1}});s.musicList=e.data.rows,s.pageInfo.total=e.data.total,s.pageInfo.total==0?s.isshowData=!0:s.isshowData=!1}catch(e){console.log(e)}},o=e=>{s.search={subjectIds:e.subject,musicTagIds:e.albumTagIds,idAndName:e.search},s.pageInfo.page=1,t()};return f(()=>{}),{...d(s),getList:o,getMusicList:t}},render(){return a("div",null,[a("div",null,[a("div",{class:i.w1200},[a("div",{class:i.section},[a("div",{class:i.musicList},[this.musicList.map(s=>a(S,{item:s},null))])])]),this.isshowData&&a(u,null,null)]),a(m,{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)])}}),G=h({name:"searchdetail",components:{hotSearch:n,silder:p,searchInput:r,searchAlbum:y,searchMusic:T},setup(){const s=g({albumList:[],musicList:[],chiose:"album",searchs:{albumTagIds:"",search:"",subject:""}}),t=A(),o=w(),e=w(),R=l=>{s.searchs.albumTagIds=l.join(","),b(s.searchs)},b=l=>{s.searchs={...s.searchs,...l},c()},c=()=>{s.chiose=="album"&&o.value.getList(s.searchs),s.chiose=="music"&&e.value.getList(s.searchs)};return D(()=>s.chiose,l=>{console.log(l),L(()=>{c()})}),f(()=>{console.log(t.name),t.params.search&&(s.searchs.search=t.params.search),t.params.subject&&(s.searchs.subject=t.params.subject),t.params.type&&(s.chiose=t.params.type),L(()=>{c()})}),{...d(s),startSearch:b,searchRust:R,searchAlbumRef:o,searchMusicRef:e,search:c}},render(){return a("div",null,[a("div",{class:""},[a("div",{class:"wall",style:{height:"60px"}},null),a("div",{class:i.w1200},[a("div",{class:i.section},[a(r,{isWhile:!0,searchVal:{...this.searchs},onStartSearch:s=>{this.startSearch(s)}},null),a("div",{class:i.hotSearch},[a(n,{type:"search",onSearchRust:s=>this.searchRust(s),onHotTag:s=>{this.searchs.search=s,this.search()},isChiose:!0},null)]),a("div",{class:i.myTabWrap},[a(M,{class:i.myTab,modelValue:this.chiose,"onUpdate:modelValue":s=>this.chiose=s},{default:()=>[a(v,{label:"\u4E13\u8F91",name:"album"},{default:()=>[this.chiose=="album"?a(y,{ref:"searchAlbumRef"},null):null]}),a(v,{label:"\u4E50\u8C31",name:"music"},{default:()=>[this.chiose=="music"?a(T,{ref:"searchMusicRef"},null):null]})]})])])])])])}});export{G as default};
