"use strict";var e=require("../common/vendor.js"),r=require("../uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js"),n=require("../api/package.js");require("../common/request.js");const p=()=>"../components/Menu.js",d={components:{Menu:p},mixins:[r.MescrollMixin],data(){return{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:"\u5DF2\u7ECF\u5230\u5E95\u4E86",empty:{icon:"https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",tip:"\u6682\u65E0\u6570\u636E"}},dataList:[]}},onLoad(){},onShow(){this.getPackagCateList(1)},methods:{menuClick(o){this.diseaseType=o.cateCode,this.mescroll.resetUpScroll()},getPackagCateList(o){var s={type:o},i=this;n.getPackagCateList(s).then(l=>{if(l.code==200){this.cates=l.data;var t=e.index.createSelectorQuery().in(i);setTimeout(function(){t.select(".top-content").boundingClientRect(c=>{c&&(console.log("View height:",c.height+"px"),i.top=c.height+"px")}).exec()},500)}},l=>{})},choseType(o){this.diseaseType=o.cateCode,this.mescroll.resetUpScroll()},doSearch(){this.mescroll.resetUpScroll()},navTo(o){e.index.navigateTo({url:o})},mescrollInit(o){this.mescroll=o},downCallback(){this.mescroll.resetUpScroll()},upCallback(o){var s=this,i={isShow:1,diseaseType:this.diseaseType,keyword:this.keyword,pageNum:o.num,pageSize:o.size};n.getPackageList(i).then(l=>{l.code==200?(o.num==1?s.dataList=l.data.list:s.dataList=s.dataList.concat(l.data.list),s.mescroll.endBySize(l.data.list.length,l.data.total)):(e.index.showToast({icon:"none",title:"\u8BF7\u6C42\u5931\u8D25"}),s.dataList=null,s.mescroll.endErr())})}}};if(!Array){const o=e.resolveComponent("Menu"),s=e.resolveComponent("mescroll-body");(o+s)()}const m=()=>"../uni_modules/mescroll-uni/components/mescroll-body/mescroll-body.js";Math||m();function u(o,s,i,l,t,c){return e.e({a:e.o((...a)=>c.doSearch&&c.doSearch(...a)),b:t.keyword,c:e.o(a=>t.keyword=a.detail.value),d:t.cates.length>0},t.cates.length>0?{e:e.o(c.menuClick),f:e.p({list:t.cates})}:{},{g:t.top!=null},t.top!=null?{h:e.f(t.dataList,(a,g,_)=>({a:a.imgUrl,b:e.t(a.packageName),c:e.t(a.price.toFixed(2)),d:e.t(a.sales),e:e.o(y=>c.navTo("/pages_index/packageDetails?packageId="+a.packageId))})),i:e.sr("mescrollRef","672cc76e-1"),j:e.o(c.mescrollInit),k:e.o(c.downCallback),l:e.o(c.upCallback),m:e.p({top:t.top,bottom:"0",down:t.downOption,up:t.upOption})}:{})}var h=e._export_sfc(d,[["render",u],["__scopeId","data-v-672cc76e"],["__file","E:/Project/2023/\u95EE\u8BCA\u5E73\u53F0/his_user_miniapp/pages_index/packageList.vue"]]);wx.createPage(h);
