baseIndex-c0204fa9.js 5.9 KB

1
  1. import{d as v,q as I,r as A,x as w,y,a6 as l,a as e,h as L,a1 as Q,M as S,W as _}from"./index-5e5e4ebc.js";import{i as E,a as J,b as H}from"./api-1484979f.js";import{M as h}from"./index-b0b41946.js";import{N as b}from"./Image-2736fe87.js";import"./index-f6b73f03.js";import"./index-4bcfa431.js";import"./fade-in-scale-up.cssr-b7c54253.js";const M="_container_1ldz1_1",G="_back_1ldz1_10",R="_centerSearch_1ldz1_25",Y="_section_1ldz1_39",U="_directorySection_1ldz1_43",N="_directionc_1ldz1_50",V="_dirItem_1ldz1_63",z="_active_1ldz1_77",q="_content_1ldz1_83",x="_wrap_1ldz1_96",T="_emtpyWrap_1ldz1_103",W="_wrapfirstI_1ldz1_122",D="_wrapItem_1ldz1_126",F="_item_1ldz1_136",K="_name_1ldz1_167",P="_favoriteBtn_1ldz1_174",X="_containerImg_1ldz1_180",j="_cover_1ldz1_206",O="_loaded_1ldz1_236",t={container:M,back:G,centerSearch:R,section:Y,directorySection:U,directionc:N,dirItem:V,active:z,content:q,wrap:x,emtpyWrap:T,wrapfirstI:W,wrapItem:D,item:F,name:K,favoriteBtn:P,containerImg:X,cover:j,loaded:O},Z="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQQAAAFwCAMAAABpZfXvAAAAV1BMVEXy8vL////Pz8/R0dHk5OS3t7fMzMzT09PKysre3t7h4eHAwMDDw8O9vb26urq2trbIyMjGxsbb29vZ2dnX19fV1dXp6enu7u7w8PDr6+v39/f7+/vm5uai4HaqAAAHe0lEQVR42uzBgQAAAACAoP2pF6kCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABm50zW5ATBKIpgIZMGnLV8/+cMg6BGLZNdQ+p81bVw1yf3vyDa+fLly5f/iLFnTYcQhBjDoqH50g8j+J8YWAMxxgQbAW1NLYwxYwL8F4wMEWINEB2BWkMdzJL/Bx76DhMHRu1BgbHgPSQ9GD0iOwUaayF48OQJaxgK4oFt4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5G4qUZoLXRJnqd5evXa1eNZArIkcrh8zyK2mfBROGpok47BSk8qr0Gco5DkHdMVY1eGhULsLaA0D9fvWGDwUApFjAXUJPNf7P09Q42Ve6WpKmX78//i88uXL1++fPny5cuXL19+tweHBAAAAACC/r/2hgEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbgLA3LS2LXStLwAAAABJRU5ErkJggg==",ia=v({name:"baseIndex-list",setup(){I(),A(!1);const n=A([]),p=()=>{l({api:"goBack"})},c=w({musicTagId:null,keyword:null,page:1,rows:999}),k=A(!1),o=w({list:[],loading:!1,favoriteList:[],details:[],bookData:{},showBook:!1,book:{}}),C=A(),m=A([]),B=async()=>{try{const{data:a}=await J();n.value=a||[],n.value.length>0&&(c.musicTagId=n.value[0].id)}catch(a){}},d=async()=>{var g,u;o.loading=!0;const{musicTagId:a,...i}=c,s=await H({musicTagIds:[a],subjectId:((g=S.user.data)==null?void 0:g.subjectId)||"",...i});(s==null?void 0:s.code)===200&&Array.isArray((u=s==null?void 0:s.data)==null?void 0:u.rows)&&(o.list=s.data.rows.map(r=>(r.load=!1,r.key=Date.now()+r.id,r))),o.loading=!1,k.value=!0};y(async()=>{l({api:"setStatusBarVisibility",content:{isVisibility:0}}),o.loading=!0,await B(),await d(),o.loading=!1});const f=a=>{const i=_.stringify({musicTagId:c.musicTagId,id:a.id,name:a.name}),s=location.origin+location.pathname+"#/co-ai-detail?"+i;console.log("🚀 ~ url:",s),l({api:"openWebView",content:{url:s,orientation:0,isHideTitle:!1,c_orientation:0}})};return()=>e("div",{class:t.container},[e("div",{class:t.back,onClick:p},[e("img",{src:E},null)]),e("div",{class:t.centerSearch},[e("div",{id:"coai-0"},[e(h,{class:["searchNotice"],shape:"round",background:"transparent",clearable:!1,placeholder:"请输入关键字",onSearch:a=>{c.keyword=a,d()}},null)])]),e("div",{class:t.section},[e("div",{class:t.directorySection},[e("div",{class:t.directionc},[n.value.map(a=>e("p",{class:[t.dirItem,c.musicTagId==a.id?t.active:""],onClick:()=>{c.musicTagId=a.id,d()}},[a.name]))])]),e("div",{class:t.content},[e("div",{class:[t.wrap,o.list.length<=0&&!o.loading?t.emtpyWrap:""],ref:C},[o.list.map((a,i)=>e("div",{class:t.wrapfirstI},[e("div",{ref:s=>m.value[i]=s,class:[t.wrapItem,o.bookData.id===a.id&&o.showBook?t.wrapItemHide:""],key:a.key,onClick:()=>f(a)},[e("div",{class:t.item},[e(b,L({"data-id":a.id},{id:i==0?"courseware-0":""},{class:[t.cover,a.load?t.loaded:""],objectFit:"cover",src:a.coverImg,fallbackSrc:Z,onLoad:()=>{a.load=!0},onError:()=>{a.load=!0,a.error=!0}}),null)]),e("div",{class:t.name},[a.name])])])),o.list.length<=0&&!o.loading&&e(Q,{image:"list",description:"暂无数据"},null)])])])])}});export{ia as default};