import{d as n,ah as u,ag as c,r as p,$ as g,c as a,aj as h,q as m,ak as f,m as v,g as y}from"./index.27735e87.js";import{s}from"./index.module.98478511.js";import{O as I}from"./index.71a5f9d3.js";import{L as q}from"./index.ebf6ccaa.js";import"./index.18f2dec1.js";import"./index.d02ae1ba.js";import"./use-tab-status.d6e8df54.js";var L=n({name:"photo-detail",props:{orchestraId:{type:String,default:""}},setup(l){const i=u(),d=c();console.log("\u{1F680} ~ route",i);const e=p({loading:!1,finished:!1,pages:{page:1,rows:20},list:[]}),r=async()=>{var t;if(!e.loading){e.loading=!0;try{const o=await v.post(`${y.platformApi}/orchestraPhotoAlbum/page`,{data:{...e.pages,orchestraId:l.orchestraId||i.query.orchestraId,parentId:i.query.id}});Array.isArray((t=o==null?void 0:o.data)==null?void 0:t.rows)?(e.list=e.list.concat(o.data.rows),e.pages.page+=1,e.finished=!o.data.next):e.finished=!0}catch{e.finished=!0}e.loading=!1}};return g(()=>{r(),document.title=i.query.name||""}),()=>a("div",null,[a(I,null,{default:()=>[a(h,{title:i.query.name||"\u76F8\u518C"},null)]}),a("div",{class:s.phoneDetail},[!e.loading&&!!e.list.length&&a(q,{loadingText:" ",finished:e.finished,finishedText:" ",onLoad:r,immediateCheck:!1},{default:()=>[a("div",{class:s.photoWrap},[e.list.map((t,o)=>a("div",{class:s.photoItem,onClick:()=>{d.push({path:"/photo-list-detail",query:{photoId:t.id}})}},[a("div",{class:s.imgSection},[a("div",{class:s.gridImg,style:t.coverUrl?{backgroundImage:`url(${t.coverUrl})`,backgroundSize:"cover"}:""},null)]),a("div",{class:[s.gridName,"van-ellipsis"]},[t.name||""]),a("div",{class:s.gridDes},[t.photoCount||0,m("\u5F20")])]))])]}),!e.loading&&!e.list.length&&a(f,{btnStatus:!1,tips:"\u6682\u65E0\u76F8\u518C"},null)])])}});export{L as default};
