index-f289c906-1728525661307.js 13 KB

1
  1. import{T as W}from"./index-234002d0-1728525661307.js";import{T as y}from"./index-4e5d834b-1728525661307.js";import{H as k,d as U,u as Z,c as _,e as R,r as B,q as L,T as b,f as e,S as A,k as a,E as V,D as C,z as D,aD as K,aW as M}from"./index-324a91a1-1728525661307.js";import{c as X}from"./api-cf6cc973-1728525661307.js";import{T as P}from"./index-e4dbb426-1728525661307.js";import{v as q}from"./urlUtils-72ef455d-1728525661307.js";import{P as E}from"./index-974f5f6f-1728525661307.js";import{N as g}from"./Scrollbar-26dcbbee-1728525661307.js";const I="_list_owxkd_1",H="_topTitle_owxkd_9",O="_searchSection_owxkd_19",z="_searchInput_owxkd_25",J="_moreMusic_owxkd_41",G="_container_owxkd_65",Y="_section_owxkd_71",j="_sectionTitle_owxkd_78",Q="_imgTitle_owxkd_84",$="_moreBtn_owxkd_87",ee="_recommendSection_owxkd_108",se="_hotSection_owxkd_115",te="_newSection_owxkd_122",oe="_item_owxkd_132",ne="_num_owxkd_143",ie="_num1_owxkd_151",ae="_num2_owxkd_154",ce="_num3_owxkd_157",le="_img_owxkd_84",re="_infos_owxkd_172",ue="_topName_owxkd_176",de="_types_owxkd_186",me="_hot_owxkd_115",pe="_sing_owxkd_215",ge="_song_owxkd_216",we="_author_owxkd_233",he="_searchContainer_owxkd_237",ye="_empty_owxkd_241",ve="_loadingWrap_owxkd_247",Fe="_showLoading_owxkd_252",Te="_sectionContainer_owxkd_261",fe="_sectionItem_owxkd_266",s={list:I,topTitle:H,searchSection:O,searchInput:z,moreMusic:J,container:G,section:Y,sectionTitle:j,imgTitle:Q,moreBtn:$,recommendSection:ee,hotSection:se,newSection:te,item:oe,num:ne,num1:ie,num2:ae,num3:ce,img:le,infos:re,topName:ue,types:de,hot:me,sing:pe,song:ge,author:we,searchContainer:he,empty:ye,loadingWrap:ve,showLoading:Fe,sectionContainer:Te,sectionItem:fe},ke=""+new URL("reommon_title-ec5251b9.png",import.meta.url).href,Se=""+new URL("new_title-a8d05805.png",import.meta.url).href,Ne="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVYAAABaCAMAAADUxI5+AAAC7lBMVEUAAAD13e0UFhb33u/03ewVFRUVFRVtZGsUFRb+3vT03Oz13+/03+0TFRYUFBUUFBYUFBYUFBYUFBUTFBUTFRb03e313e0fHx8UFhZIQkcUFRUgICD03e0cHB723e0TFBUUFBb03e7///8UFRX13e0UFBn33u7/6P//4v/13ez13e0TFRb43vL13e313ez13ewXFxcVGRr/6fcUFRb13e313e313uz23e0VFhb43vD13e323+753u/13O303e0UFRf13e303Oz03e313e4TFRX23u723u323e354O4XFxf/4vH13e0TFBUTFBb13e313e313e0TFRYXGBj03e323e303e723u713e713u323u/25e324/L03e313e303Oz13ez13O313u713e0UFRUUFBYTFhYUFBUUFRb/5vMXFxesnKcaGxwyMDITFRb13e303u323e313fAbGxsdJCQTFBX13O0UFRYTFRUUFBUTFRX33e713u/13e703+0WFhYWFhb44fD13Ozs1eXNucYTFBYsKiw6Nzv13O22prHSvswUFhpxbHF7cHlLRUpDPUIoJynBsLydj5llXWQTFBUYGRqQg4w7NzxPSU7eyNZjXGPdx9ZJQ0gVFRegkZvn0N+ShI5wZ25nXmVvZmx2bXOYiZKDeICwn6pRS1EkIyXp0uDXwtEjIiPEsb2Cdn+vnapuZW20o69uZ2zjzdqPhI/Pu8nhy9utoa3HssBnXme8qLX03OwTFBXm0N+0o6+OgYpJREg1MjUuLS/HtMHu1uWej5qRhI5nX2bs1eRAPEAkIyUVFhetnah2bHNCPUJ5b3dPSE5tZGvy2urLt8ShkZzeyddeV1xZUlhTTVI9Oj0eHiB4bnVEQEQaGhyJfYbPu8nEsb68qreomKSViJHNucbArrqklqCbjJeDeIB/dXwpKCrbxtSMgIhyaHAwLjHTv83KtsO4p7OPgoxLRko4NTjWwc+zoq6yoa3o0uGxoKxiWmBxKocLAAAAunRSTlMA0IEf12Ak7dwXX09IrsyLiXKZ++vvnxCN9MIH8eVwyrB4BdrLMzoKCP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g-aaf8257e.png",import.meta.url).href;function v(c){return typeof c=="function"||Object.prototype.toString.call(c)==="[object Object]"&&!C(c)}const m=c=>{if(c<1e4)return c;{const w=c/1e4;return Number(w.toFixed(1))+"万"}},Ue=U({name:"xiaoku-list",setup(){const c=Z(),w=_(),t=R({HOT:[],NEW:[],RECOMMEND:[],isSearch:!1,keyword:null,list:[],loading:!1,finshed:!1,page:1,rows:20,previewModal:!1,previewParams:{type:"",src:""}}),S=async()=>{try{const{data:n}=await xe();t.RECOMMEND=n.RECOMMEND||[],t.HOT=n.HOT||[],t.NEW=n.NEW||[]}catch(n){}},F=async()=>{t.loading=!0;try{const{data:n}=await X({keyword:t.keyword,page:t.page,rows:t.rows});(n.rows||[]).forEach(u=>{if(u.musicSheetName){const o=new RegExp(t.keyword,"gi"),i=u.musicSheetName.replace(o,"<span>$&</span>");u.musicNameReg=i}}),t.list=[...t.list,...n.rows],t.finshed=t.page>=n.pages,console.log(n,t.list,"list")}catch(n){console.log(n,"e")}t.loading=!1},T=B(),N=()=>{t.loading||t.finshed||(t.page=t.page+1,F())},x=()=>{new IntersectionObserver(l=>{l[0].intersectionRatio>0&&N()}).observe(T.value)},p=n=>{c.push({path:"/xiaoku-detail",query:{type:n}})},h=n=>{let l=n.scoreType||"FIRST",u="".concat(q(),"/instrument?v=").concat(+new Date,"&platform=pc&id=").concat(n.id,"&Authorization=").concat(w.getToken,"&musicRenderType=").concat(l,"&showGuide=true&part-index=0");window.matchMedia("(display-mode: standalone)").matches?(D.application=window.matchMedia("(display-mode: standalone)").matches,t.previewModal=!0,K(),t.previewParams={type:"music",src:u}):window.open(u,+new Date+"")},f=n=>{var l;((l=n.data)==null?void 0:l.api)==="onAttendToggleMenu"&&(M(),t.previewModal=!t.previewModal)};return L(()=>{S(),window.addEventListener("message",f)}),b(()=>{window.removeEventListener("message",f)}),()=>{let n,l,u;return e("div",{class:s.list},[e("h2",{class:s.topTitle},[e("img",{src:We},null)]),e("div",{class:s.searchSection},[e(W,{round:!0,class:s.searchInput,onSearch:o=>{o&&o.trim()?(t.isSearch=!0,t.keyword=o.trim(),t.loading=!0,t.finshed=!1,t.list=[],F(),A(()=>{x()})):t.isSearch=!1}},null),e("div",{class:s.moreMusic,onClick:()=>p()},[a("全部曲目")])]),t.isSearch?e("div",{class:s.searchContainer},[e(g,null,{default:()=>[e("div",{class:s.sectionContainer},[t.list.map(o=>{var i,r;return e("div",{class:s.sectionItem},[e("div",{class:s.img,style:{marginLeft:0}},[e("img",{referrerpolicy:"no-referrer",src:o.titleImg},null)]),e("div",{class:s.infos},[e("div",{class:s.topName,innerHTML:o.musicNameReg},null),e("div",{class:s.types},[e("div",{class:s.hot},[e("span",null,[m(o.usedNum)])]),((i=o.audioPlayTypes)==null?void 0:i.includes("SING"))&&e("div",{class:s.sing},[a("演唱")]),((r=o.audioPlayTypes)==null?void 0:r.includes("PLAY"))&&e("div",{class:s.song},[a("演奏")]),e("div",{class:s.author},[o.composer])])])])})]),e("div",{ref:T,class:[s.loadingWrap,t.finshed&&s.showLoading]},[e(V,{show:!0},null)])]}),!t.loading&&t.list.length===0&&e("div",{class:s.empty},[e(P,null,null)])]):e("div",{class:s.container},[e("div",{class:[s.section,s.recommendSection]},[e("div",{class:s.sectionTitle},[e("img",{src:ke,class:s.imgTitle},null),e("div",{class:s.moreBtn,onClick:()=>p("RECOMMEND")},[a("更多")])]),e(g,null,v(n=t.RECOMMEND.map((o,i)=>{var r,d;return e("div",{class:s.item,onClick:()=>{h(o)}},[e("div",{class:[s.num,i===0?s.num1:"",i===1?s.num2:"",i===2?s.num3:""]},[(i+1).toString().padStart(2,"0")]),e("div",{class:s.img},[e("img",{referrerpolicy:"no-referrer",src:o.titleImg},null)]),e("div",{class:s.infos},[e("div",{class:s.topName},[e(y,{text:o.musicSheetName},null)]),e("div",{class:s.types},[e("div",{class:s.hot},[e("span",null,[m(o.usedNum)])]),((r=o.audioPlayTypes)==null?void 0:r.includes("SING"))&&e("div",{class:s.sing},[a("演唱")]),((d=o.audioPlayTypes)==null?void 0:d.includes("PLAY"))&&e("div",{class:s.song},[a("演奏")]),e("div",{class:s.author},[o.composer])])])])}))?n:{default:()=>[n]})]),e("div",{class:[s.section,s.hotSection]},[e("div",{class:s.sectionTitle},[e("img",{src:Ne,class:s.imgTitle},null),e("div",{class:s.moreBtn,onClick:()=>p("HOT")},[a("更多")])]),e(g,null,v(l=t.HOT.map((o,i)=>{var r,d;return e("div",{class:s.item,onClick:()=>{h(o)}},[e("div",{class:[s.num,i===0?s.num1:"",i===1?s.num2:"",i===2?s.num3:""]},[(i+1).toString().padStart(2,"0")]),e("div",{class:s.img},[e("img",{referrerpolicy:"no-referrer",src:o.titleImg},null)]),e("div",{class:s.infos},[e("div",{class:s.topName},[e(y,{text:o.musicSheetName},null)]),e("div",{class:s.types},[e("div",{class:s.hot},[e("span",null,[m(o.usedNum)])]),((r=o.audioPlayTypes)==null?void 0:r.includes("SING"))&&e("div",{class:s.sing},[a("演唱")]),((d=o.audioPlayTypes)==null?void 0:d.includes("PLAY"))&&e("div",{class:s.song},[a("演奏")]),e("div",{class:s.author},[o.composer])])])])}))?l:{default:()=>[l]})]),e("div",{class:[s.section,s.newSection]},[e("div",{class:s.sectionTitle},[e("img",{src:Se,class:s.imgTitle},null),e("div",{class:s.moreBtn,onClick:()=>p("NEW")},[a("更多")])]),e(g,null,v(u=t.NEW.map((o,i)=>{var r,d;return e("div",{class:s.item,onClick:()=>{h(o)}},[e("div",{class:[s.num,i===0?s.num1:"",i===1?s.num2:"",i===2?s.num3:""]},[(i+1).toString().padStart(2,"0")]),e("div",{class:s.img},[e("img",{referrerpolicy:"no-referrer",src:o.titleImg},null)]),e("div",{class:s.infos},[e("div",{class:s.topName},[e(y,{text:o.musicSheetName},null)]),e("div",{class:s.types},[e("div",{class:s.hot},[e("span",null,[m(o.usedNum)])]),((r=o.audioPlayTypes)==null?void 0:r.includes("SING"))&&e("div",{class:s.sing},[a("演唱")]),((d=o.audioPlayTypes)==null?void 0:d.includes("PLAY"))&&e("div",{class:s.song},[a("演奏")]),e("div",{class:s.author},[o.composer])])])])}))?u:{default:()=>[u]})])]),e(E,{show:t.previewModal,"onUpdate:show":o=>t.previewModal=o,type:"music",params:t.previewParams},null)])}}}),De=Object.freeze(Object.defineProperty({__proto__:null,default:Ue,formatUsedNum:m},Symbol.toStringTag,{value:"Module"}));export{Ce as a,m as f,De as i};