searchdetail.d73e5b53.js 5.3 KB

1
  1. var V=Object.defineProperty,_=Object.defineProperties;var E=Object.getOwnPropertyDescriptors;var L=Object.getOwnPropertySymbols;var P=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var S=(s,a,i)=>a in s?V(s,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):s[a]=i,l=(s,a)=>{for(var i in a||(a={}))P.call(a,i)&&S(s,i,a[i]);if(L)for(var i of L(a))N.call(a,i)&&S(s,i,a[i]);return s},r=(s,a)=>_(s,E(a));import{a as x,s as o}from"./index.ef3b4c7e.js";import{h as m}from"./scrollbar.min.9a825f34.js";import{b as d,r as T,g as v}from"./index.a559d154.js";import{s as p,u as H,S as W}from"./index.7544af32.js";import{P as h}from"./index.bff75964.js";import{C as g}from"./index.df1d74f7.js";import{d as b,r as I,o as j,t as y,c as e,u as k,V as A,S as $,n as R,C as B,D}from"./vendor.af53403a.js";import{a as G}from"./index.e398f14a.js";import{m as q}from"./index.4c72cc20.js";import"./moreArrow.1c43b99d.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:x,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(x,{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:G,musicListItem:q,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(q,{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),C=(n||[]).filter(f=>f>0);a.searchs.albumTagIds=C.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 $(()=>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(B,{class:o.myTab,modelValue:this.chiose,"onUpdate:modelValue":s=>this.chiose=s},{default:()=>[e(D,{label:"\u4E13\u8F91",name:"album"},{default:()=>[this.chiose=="album"?e(F,{ref:"searchAlbumRef"},null):null]}),e(D,{label:"\u4E50\u8C31",name:"music"},{default:()=>[this.chiose=="music"?e(M,{ref:"searchMusicRef"},null):null]})]})])])])])])}});export{us as default};