photo-detail-legacy.8a39f6f6.js 1.8 KB

1
  1. System.register(["./index-legacy.eb062188.js","./index.module-legacy.bef32549.js","./index-legacy.fad72574.js","./index-legacy.fecc738b.js","./function-call-legacy.0bd16987.js","./use-tab-status-legacy.91417466.js","./ImagePreview-legacy.747d0051.js","./index-legacy.fab451f1.js"],(function(t){"use strict";var e,a,i,s,n,o,l,c,d,r,u,f;return{setters:[function(t){e=t.d,a=t.ah,i=t.r,s=t.$,n=t.c,o=t.aj,l=t.ak,c=t.m},function(t){d=t.s},function(t){r=t.L},function(t){u=t.I},function(t){f=t.s},function(){},function(){},function(){}],execute:function(){t("default",e({name:"photo-detail",setup(){const t=a(),e=i({isEdit:!1,isLoading:!1,list:[],listState:{dataShow:!0,loading:!1,finished:!1},params:{page:1,rows:20}}),g=async()=>{try{if(e.isLoading)return;e.isLoading=!0;const a=await c.post("/api-school/orchestraPhoto/page",{data:{...e.params,orchestraPhotoAlbumId:t.query.photoId}});e.listState.loading=!1;const i=a.data||{};if(e.list.length>0&&1===i.current)return;const s=i.rows||[];e.list=e.list.concat(s),e.listState.finished=i.current>=i.pages,e.params.page=i.current+1,e.listState.dataShow=e.list.length>0,e.isLoading=!1}catch{e.listState.dataShow=!1,e.listState.finished=!0,e.isLoading=!1}};return s((()=>{g(),document.title=t.query.name||""})),()=>n("div",{class:[d.phoneDetail,!e.listState.dataShow&&"emptyRootContainer"]},[n(o,{title:t.query.name||""},null),e.listState.dataShow?n(r,{finished:e.listState.finished,finishedText:" ",onLoad:g,immediateCheck:!1},{default:()=>[n("div",{class:d.phoneContainer,style:{paddingTop:"12px"}},[e.list.map(((t,a)=>n("div",{class:[d.item],onClick:()=>{(t=>{const a=e.list.map((t=>t.fileUrl));f({images:a,startPosition:t,closeable:!0})})(a)}},[n(u,{class:d.img,src:t.fileUrl,fit:"cover"},null)])))])]}):n(l,{btnStatus:!1,tips:"暂无相片"},null)])}}))}}}));