photo-detail.eab3ece2.js 1.6 KB

1
  1. import{d,ah as m,r as p,$ as u,c as e,aj as c,ak as f,m as h}from"./index.5f7ffb46.js";import{s as i}from"./index.module.b9eeb1f8.js";import{L as g}from"./index.9ef28852.js";import{I as S}from"./index.276a5d68.js";import{s as w}from"./function-call.aca3a7bc.js";import"./use-tab-status.69b57a37.js";import"./ImagePreview.289405c5.js";import"./index.99e0cf1f.js";var k=d({name:"photo-detail",setup(){const o=m(),t=p({isEdit:!1,isLoading:!1,list:[],listState:{dataShow:!0,loading:!1,finished:!1},params:{page:1,rows:20}}),l=async()=>{try{if(t.isLoading)return;t.isLoading=!0;const s=await h.post("/api-school/orchestraPhoto/page",{data:{...t.params,orchestraPhotoAlbumId:o.query.photoId}});t.listState.loading=!1;const a=s.data||{};if(t.list.length>0&&a.current===1)return;const r=a.rows||[];t.list=t.list.concat(r),t.listState.finished=a.current>=a.pages,t.params.page=a.current+1,t.listState.dataShow=t.list.length>0,t.isLoading=!1}catch{t.listState.dataShow=!1,t.listState.finished=!0,t.isLoading=!1}},n=s=>{const a=t.list.map(r=>r.fileUrl);w({images:a,startPosition:s,closeable:!0})};return u(()=>{l(),document.title=o.query.name||""}),()=>e("div",{class:[i.phoneDetail,!t.listState.dataShow&&"emptyRootContainer"]},[e(c,{title:o.query.name||""},null),t.listState.dataShow?e(g,{finished:t.listState.finished,finishedText:" ",onLoad:l,immediateCheck:!1},{default:()=>[e("div",{class:i.phoneContainer,style:{paddingTop:"12px"}},[t.list.map((s,a)=>e("div",{class:[i.item],onClick:()=>{n(a)}},[e(S,{class:i.img,src:s.fileUrl,fit:"cover"},null)]))])]}):e(f,{btnStatus:!1,tips:"\u6682\u65E0\u76F8\u7247"},null)])}});export{k as default};