index.ece334c5.js 1.7 KB

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