"use strict";var e=require("../../common/vendor.js"),t=require("../../uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js"),o=require("../../api/package.js");require("../../common/request.js");const a={components:{Menu:()=>"../../components/Menu.js"},mixins:[t.MescrollMixin],data:()=>({top:null,cates:[],diseaseType:0,keyword:"",mescroll:null,downOption:{use:!0,auto:!1},upOption:{onScroll:!1,use:!0,page:{pae:0,size:10},noMoreSize:10,textNoMore:"已经到底了",empty:{icon:"https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",tip:"暂无数据"}},dataList:[]}),onLoad(){this.getPackagCateList(1)},methods:{menuClick(e){this.diseaseType=e.cateCode,this.mescroll.resetUpScroll()},getPackagCateList(t){var a={type:t},s=this;o.getPackagCateList(a).then((t=>{if(200==t.code){this.cates=t.data;var o=e.index.createSelectorQuery().in(s);setTimeout((function(){o.select(".top-content").boundingClientRect((e=>{e&&(console.log("View height:",e.height+"px"),s.top=e.height+"px")})).exec()}),500)}}),(e=>{}))},doSearch(){this.mescroll.resetUpScroll()},navTo(t){e.index.navigateTo({url:t})},mescrollInit(e){this.mescroll=e},downCallback(){this.mescroll.resetUpScroll()},upCallback(t){var a=this,s={isShow:1,diseaseType:this.diseaseType,keyword:this.keyword,pageNum:t.num,pageSize:t.size};o.getPackageList(s).then((o=>{200==o.code?(1==t.num?a.dataList=o.data.list:a.dataList=a.dataList.concat(o.data.list),a.mescroll.endBySize(o.data.list.length,o.data.total)):(e.index.showToast({icon:"none",title:"请求失败"}),a.dataList=null,a.mescroll.endErr())}))}}};if(!Array){(e.resolveComponent("Menu")+e.resolveComponent("mescroll-body"))()}Math;var s=e._export_sfc(a,[["render",function(t,o,a,s,i,l){return e.e({a:e.o(((...e)=>l.doSearch&&l.doSearch(...e))),b:i.keyword,c:e.o((e=>i.keyword=e.detail.value)),d:i.cates.length>0},i.cates.length>0?{e:e.o(l.menuClick),f:e.p({list:i.cates})}:{},{g:null!=i.top},null!=i.top?{h:e.f(i.dataList,((t,o,a)=>({a:t.imgUrl,b:e.t(t.packageName),c:e.t(t.price.toFixed(2)),d:e.t(t.sales),e:e.o((e=>l.navTo("/pages_index/packageDetails?packageId="+t.packageId)))}))),i:e.sr("mescrollRef","731f1527-1"),j:e.o(l.mescrollInit),k:e.o(l.downCallback),l:e.o(l.upCallback),m:e.p({top:i.top,bottom:"0",down:i.downOption,up:i.upOption})}:{})}],["__scopeId","data-v-731f1527"]]);wx.createPage(s);
