"use strict";const e=require("../../common/vendor.js"),a=require("../../common/assets.js"),t=require("../../api/index.js");if(!Array){(e.resolveComponent("wd-navbar")+e.resolveComponent("z-paging"))()}Math||((()=>"../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.js")+(()=>"../../uni_modules/z-paging/components/z-paging/z-paging.js"))();const n=e.defineComponent({__name:"notice",setup(n){const o=e.ref(1),l=e.ref(""),i=e.ref(null),u=e.ref([]),s=e.ref([]);e.onLoad((()=>{t.api.noticeCatePage().then((e=>{s.value=e.list}))}));const r=(e,a)=>{o.value=e,l.value=a,i.value.reload()},c=(e,a)=>{t.api.noticePage({pageNo:e,pageSize:a,type:o.value,categoryId:l.value}).then((e=>{i.value.complete(e.list)})).catch((e=>{i.value.complete(!1)}))},v=()=>{e.index.navigateBack()};return(t,n)=>({a:e.o(v),b:e.p({title:"公告",safeAreaInsetTop:!0,"left-arrow":!0}),c:e.n(1==o.value?"active":""),d:e.o((e=>r(1,""))),e:e.f(s.value,((a,t,n)=>({a:e.t(a.categoryName),b:e.n(2==o.value&&l.value==a.id?"active":""),c:e.o((e=>r(2,a.id)),t),d:t}))),f:e.f(u.value,((t,n,l)=>e.e({a:e.t(1==o.value?t.content:t.title)},2==o.value?{b:a._imports_0$1}:{},{c:n,d:e.o((a=>(a=>{1==o.value?e.index.showModal({title:"通知",content:a.content,showCancel:!1}):e.index.navigateTo({url:"/pages/notice/details?id="+a.id})})(t)),n)}))),g:e.t(1==o.value?"通知":2==o.value?s.value.find((e=>e.id==l.value)).categoryName:""),h:2==o.value,i:e.sr(i,"795fab27-1",{k:"paging"}),j:e.o(c),k:e.o((e=>u.value=e)),l:e.p({"use-page-scroll":!0,modelValue:u.value})})}}),o=e._export_sfc(n,[["__scopeId","data-v-795fab27"]]);wx.createPage(o);
