"use strict";var e=require("../common/vendor.js"),d=require("../api/package.js"),y=require("../uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js");require("../common/request.js");const h={mixins:[y.MescrollMixin],data(){return{cates:[],privateType: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:[]}},onShow(){this.getPackagCateList(2)},methods:{getPackagCateList(a){var c={type:a};d.getPackagCateList(c).then(i=>{i.code==200&&(this.cates=i.data)},i=>{})},showMore(a){a.displayMore=a.displayMore==1?0:1,a.displayText=a.displayMore==1?"\u6536\u8D77":"\u70B9\u51FB\u67E5\u770B\u65B9\u6848\u660E\u7EC6"},navTo(a){e.index.navigateTo({url:a})},doSearch(){this.mescroll.resetUpScroll()},mescrollInit(a){this.mescroll=a},downCallback(a){a.resetUpScroll()},upCallback(a){var c=this,i={isShow:0,keyword:this.keyword,privateType:this.privateType,pageNum:a.num,pageSize:a.size};d.getPackageList(i).then(l=>{l.code==200?(l.data.list.forEach(function(r){r.displayMore=0,r.displayText="\u70B9\u51FB\u67E5\u770B\u65B9\u6848\u660E\u7EC6",r.productJson!=null?r.products=JSON.parse(r.productJson):r.products=[]}),a.num==1?c.dataList=l.data.list:c.dataList=c.dataList.concat(l.data.list),c.mescroll.endBySize(l.data.list.length,l.data.total)):(e.index.showToast({icon:"none",title:"\u8BF7\u6C42\u5931\u8D25"}),c.dataList=null,c.mescroll.endErr())})},choseType(a){this.privateType=a.cateCode,this.mescroll.resetUpScroll()}}};Array||e.resolveComponent("mescroll-body")();const m=()=>"../uni_modules/mescroll-uni/components/mescroll-body/mescroll-body.js";Math||m();function _(a,c,i,l,r,s){return{a:e.o((...o)=>s.doSearch&&s.doSearch(...o)),b:r.keyword,c:e.o(o=>r.keyword=o.detail.value),d:e.f(r.cates,(o,n,p)=>({a:e.t(o.cateName),b:n,c:e.n(r.privateType==o.cateCode?"item active":"item"),d:e.o(t=>s.choseType(o),n)})),e:e.f(r.dataList,(o,n,p)=>e.e({a:e.t(o.packageName),b:e.t(o.secondName),c:e.f(o.products,(t,u,f)=>e.e({a:t.image,b:e.t(t.productName),c:e.t(t.sku),d:t.price!=null},t.price!=null?{e:e.t(t.price.toFixed(2))}:{},{f:e.t(t.count),g:u})),d:e.n(o.displayMore==0?"hide":"show"),e:e.t(o.displayText),f:e.o(t=>s.showMore(o)),g:o.totalPrice!=null},o.totalPrice!=null?{h:e.t(o.totalPrice.toFixed(2))}:{},{i:e.o(t=>s.navTo("/pages_company/packageDetails?packageId="+o.packageId)),j:n})),f:e.sr("mescrollRef","0b3603ba-0"),g:e.o(s.mescrollInit),h:e.o(s.downCallback),i:e.o(s.upCallback),j:e.p({top:"192rpx",down:r.downOption,up:r.upOption})}}var g=e._export_sfc(h,[["render",_],["__file","E:/Project/2023/\u95EE\u8BCA\u5E73\u53F0/his_user_miniapp/pages_company/packageList.vue"]]);wx.createPage(g);
