"use strict";const e=require("../common/vendor.js"),r=require("../uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js"),c={mixins:[r.MescrollMixin],data(){return{integral:0,type:"0",typeOptions:[],tabIndex:0,tabs:[],mescroll:null,downOption:{use:!0,auto:!1,textInOffset:"下拉刷新",textOutOffset:"释放更新",textLoading:"加载中..."},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.getDictByKey("sys_integral_goods_type"),this.getUserInfo()},methods:{getUserInfo(){getUserInfo().then(t=>{t.code==200?t.user!=null&&(this.integral=t.user.integral):e.index.showToast({icon:"none",title:"请求失败"})},t=>{})},navTo(t){e.index.navigateTo({url:t})},goIntegral(){let t=getCurrentPages(),s=t[t.length-2];t.length>1&&s&&s.route=="pages/user/integral/points"?e.index.navigateBack():e.index.navigateTo({url:"/pages/user/integral/points"})},getDictByKey(t){var s={key:t},i=this;getDictByKey(s).then(n=>{n.code==200&&(this.typeOptions=n.data,this.typeOptions.forEach(function(a,l){var o={name:a.dictLabel};i.tabs.push(o)}),this.tabs.length>0&&(this.tabIndex=0))},n=>{})},tabChange(t){e.index.__f__("log","at pages_user/integralGoodsList.vue:154",t.index),this.type=this.typeOptions[t.index].dictValue,this.mescroll.resetUpScroll()},mescrollInit(t){this.mescroll=t},downCallback(t){t.resetUpScroll()},upCallback(t){var s=this,i={pageNum:t.num,pageSize:t.size};this.type!=null&&(i.goodsType=this.type),getIntegralGoodsList(i).then(n=>{n.code==200?(t.num==1?s.dataList=n.data.list:s.dataList=s.dataList.concat(n.data.list),s.mescroll.endBySize(n.data.list.length,n.data.total)):(e.index.showToast({icon:"none",title:"请求失败"}),s.dataList=null,s.mescroll.endErr())})}}};if(!Array){const t=e.resolveComponent("u-tabs"),s=e.resolveComponent("u-sticky"),i=e.resolveComponent("mescroll-body");(t+s+i)()}const u=()=>"../uni_modules/uview-plus/components/u-tabs/u-tabs.js",d=()=>"../uni_modules/uview-plus/components/u-sticky/u-sticky.js",g=()=>"../uni_modules/mescroll-uni/components/mescroll-body/mescroll-body.js";Math||(u+d+g)();function p(t,s,i,n,a,l){return e.e({a:e.t(a.integral),b:e.o((...o)=>l.goIntegral&&l.goIntegral(...o)),c:e.o(o=>l.navTo("/pages/user/integral/integralLogsList")),d:e.o(o=>l.navTo("/pages/user/integral/integralOrderList")),e:a.tabs.length>0},a.tabs.length>0?{f:e.o(l.tabChange),g:e.p({current:a.tabIndex,scrollable:!0,list:a.tabs,lineColor:"#FF5C03"})}:{},{h:e.f(a.dataList,(o,_,h)=>({a:o.imgUrl,b:e.t(o.goodsName),c:e.t(o.integral),d:e.t(o.otPrice.toFixed(2)),e:e.o(y=>l.navTo("/pages/user/integral/integralGoodsDetails?goodsId="+o.goodsId))})),i:e.sr("mescrollRef","a55124e7-2"),j:e.o(l.mescrollInit),k:e.o(l.downCallback),l:e.o(l.upCallback),m:e.p({bottom:"0",down:a.downOption,up:a.upOption})})}const m=e._export_sfc(c,[["render",p],["__scopeId","data-v-a55124e7"]]);wx.createPage(m); //# sourceMappingURL=../../.sourcemap/mp-weixin/pages_user/integralGoodsList.js.map