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