import{d as n,ah as u,ag as c,r as p,$ as g,c as a,aj as h,q as f,ak as m,m as y,g as v}from"./index.28bb778f.js";import{s}from"./index.module.937f7c87.js";import{O as I}from"./index.82695db9.js";import{L as q}from"./index.4ac17938.js";import"./use-tab-status.c9f6a196.js";var A=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 y.post(`${v.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},[t.name||""]),a("div",{class:s.gridDes},[t.photoCount||0,f("\u5F20")])]))])]}),!e.loading&&!e.list.length&&a(m,{btnStatus:!1,tips:"\u6682\u65E0\u76F8\u518C"},null)])])}});export{A as default};
