photo-detail.ed3e3b5a.js 1.6 KB

1
  1. import{d,ah as m,r as p,$ as c,c as e,aj as f,ak as u,m as h}from"./index.1c621181.js";import{s as i}from"./index.module.b9eeb1f8.js";import{L as g}from"./index.d5ee0b18.js";import{I as S}from"./index.4c221cbe.js";import{s as w}from"./function-call.db8bb852.js";import"./use-tab-status.40058c51.js";import"./ImagePreview.410fc85b.js";import"./index.78a302c3.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 c(()=>{l(),document.title=o.query.name||""}),()=>e("div",{class:[i.phoneDetail,!t.listState.dataShow&&"emptyRootContainer"]},[e(f,{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(u,{btnStatus:!1,tips:"\u6682\u65E0\u76F8\u7247"},null)])}});export{k as default};