"use strict";const e=require("../../common/vendor.js"),a=require("../../api/apis.js");if(!Array){e.resolveComponent("uni-load-more")()}Math;const t={__name:"classlist",setup(t){const i=e.ref([]),l=e.ref(!1),s={pageNum:1,pageSize:12};let n;e.onLoad((a=>{let{id:t=null,name:i=null,type:l=null}=a;t&&(s.id=t),l&&(s.type=l),n=i,e.index.setNavigationBarTitle({title:i}),o()})),e.onUnload((()=>{e.index.removeStorageSync("storgClassList")})),e.onReachBottom((()=>{l.value||(s.pageNum++,o())}));const o=async()=>{let t;s.id&&(t=await a.apiGetClassList({classid:s.id,pageNum:s.pageNum,pageSize:s.pageSize})),s.type&&(t=await a.apiGetHistoryList({type:s.type,pageNum:s.pageNum,pageSize:s.pageSize})),i.value=[...i.value,...t.data],s.pageSize>t.data.length&&(l.value=!0),e.index.setStorageSync("storgClassList",i.value)};return e.onShareAppMessage((e=>({title:"hzb壁纸-"+n,path:"/pages/classlist/classlist?id="+s.id+"&name="+n}))),e.onShareTimeline((()=>({title:"hzb壁纸~~~",query:"id="+s.id+"&name="+n}))),(a,t)=>e.e({a:!i.value.length&&!l.value},i.value.length||l.value?{}:{b:e.p({status:"loading"})},{c:e.f(i.value,((e,a,t)=>({a:e.smallPicurl,b:"/pages/preview/preview?id="+e._id,c:e._id}))),d:i.value.length||l.value},i.value.length||l.value?{e:e.p({status:l.value?"noMore":"loading"})}:{})}},i=e._export_sfc(t,[["__scopeId","data-v-7266cc03"]]);t.__runtimeHooks=6,wx.createPage(i);
