photo-detail.e56035be.js 1.6 KB

1
  1. import{d,aV as m,r as p,$ as c,c as s,ai as f,m as h}from"./index.ffe80dbe.js";import{s as i}from"./index.module.b9eeb1f8.js";import{L as u}from"./index.cafcb8b5.js";import{I as g}from"./index.7e972106.js";import{s as S}from"./function-call.4b573eb9.js";import"./use-tab-status.5a3cd090.js";import"./ImagePreview.fb0145e9.js";import"./index.b4b77b5a.js";var q=d({name:"photo-detail",setup(){const r=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 e=await h.post("/api-school/orchestraPhoto/page",{data:{...t.params,orchestraPhotoAlbumId:r.query.photoId}});t.listState.loading=!1;const a=e.data||{};if(t.list.length>0&&a.current===1)return;const o=a.rows||[];t.list=t.list.concat(o),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=e=>{const a=t.list.map(o=>o.fileUrl);S({images:a,startPosition:e,closeable:!0})};return c(()=>{l(),document.title=r.query.name||""}),()=>s("div",{class:[i.phoneDetail,!t.listState.dataShow&&"emptyRootContainer"]},[t.listState.dataShow?s(u,{finished:t.listState.finished,finishedText:" ",onLoad:l,immediateCheck:!1},{default:()=>[s("div",{class:i.phoneContainer,style:{paddingTop:"12px"}},[t.list.map((e,a)=>s("div",{class:[i.item],onClick:()=>{n(a)}},[s(g,{class:i.img,src:e.fileUrl,fit:"cover"},null)]))])]}):s(f,{btnStatus:!1,tips:"\u6682\u65E0\u76F8\u7247"},null)])}});export{q as default};