searchdetail.5d26bfa8.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,e,i)=>e in s?V(s,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):s[e]=i,l=(s,e)=>{for(var i in e||(e={}))P.call(e,i)&&S(s,i,e[i]);if(L)for(var i of L(e))N.call(e,i)&&S(s,i,e[i]);return s},r=(s,e)=>_(s,E(e));import{a as x,s as o}from"./index.d76dc00d.js";import{h as m}from"./scrollbar.min.3b069196.js";import{b as f,r as T,g as v}from"./index.ebd578f0.js";import{s as p,u as H,S as W}from"./index.50956bc3.js";import{P as h}from"./index.2830ae7c.js";import{C as g}from"./index.3ca9292b.js";import{d as b,r as I,o as j,t as y,c as a,u as k,V as A,S as $,n as R,C as B,D}from"./vendor.f5bf56e4.js";import{a as G}from"./index.278d1325.js";import{m as q}from"./index.e81c7af0.js";import"./moreArrow.b1ffe0ae.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:f,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]}}),e=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,e()};return j(()=>{}),r(l({},y(s)),{getList:i,getAlbumList:e})},render(){return a("div",null,[a("div",null,[a("div",{class:o.w1200},[a("div",{class:o.section},[a("div",{class:o.albumList},[this.albumList.map(s=>a(x,{detail:s},null))]),this.isshowData&&a(g,null,null)])])]),a(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:f,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]}}),e=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,e()};return j(()=>{}),r(l({},y(s)),{getList:i,getMusicList:e})},render(){return a("div",null,[a("div",null,[a("div",{class:o.w1200},[a("div",{class:o.section},[a("div",{class:o.musicList},[this.musicList.map(s=>a(q,{item:s},null))])])]),this.isshowData&&a(g,null,null)]),a(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:f,searchInput:p,searchAlbum:F,searchMusic:M},setup(){const s=H(W.SEARCH),e=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(d=>d<0),C=(n||[]).filter(d=>d>0);e.searchs.albumTagIds=C.join(","),e.searchs.exquisiteFlag=null,z[0]==-2&&(e.searchs.exquisiteFlag=1),w(e.searchs)},w=n=>{e.searchs=l(l({},e.searchs),n),u()},u=()=>{console.log(e.searchs,"1212"),e.chiose=="album"&&t.value.getList(e.searchs),e.chiose=="music"&&c.value.getList(e.searchs)};return $(()=>e.chiose,n=>{R(()=>{u()})}),j(()=>{i.params.search&&(e.searchs.search=i.params.search),i.params.subject&&(e.searchs.subject=i.params.subject),i.params.type&&(e.chiose=i.params.type),R(()=>{u()})}),r(l({},y(e)),{startSearch:w,searchRust:U,searchAlbumRef:t,searchMusicRef:c,search:u})},render(){return a("div",null,[a("div",{class:""},[a("div",{class:"wall",style:{height:"60px"}},null),a("div",{class:o.w1200},[a("div",{class:o.section},[a(p,{isWhile:!0,searchVal:l({},this.searchs),"onUpdate:searchVal":s=>{console.log(s,"1212")},type:"search",onStartSearch:s=>{this.startSearch(s)}},null),a("div",{class:o.hotSearch},[a(m,{type:"search",onSearchRust:s=>this.searchRust(s),onHotTag:s=>{this.searchs.search=s,this.search()},isChiose:!0},null)]),a("div",{class:o.myTabWrap},[a(B,{class:o.myTab,modelValue:this.chiose,"onUpdate:modelValue":s=>this.chiose=s},{default:()=>[a(D,{label:"\u4E13\u8F91",name:"album"},{default:()=>[this.chiose=="album"?a(F,{ref:"searchAlbumRef"},null):null]}),a(D,{label:"\u4E50\u8C31",name:"music"},{default:()=>[this.chiose=="music"?a(M,{ref:"searchMusicRef"},null):null]})]})])])])])])}});export{us as default};