import{r as a,o as e,n as t,c as s,b as i,d as l,e as o,f as c,w as r,g as d,h as u,i as n,F as v,k as p,p as g,v as _,A as f,t as y,B as m}from"./index-DVkgSHpn.js";import{_ as h}from"./el-navbar.DVIyjZEN.js";import{_ as b}from"./el-refresh.CkIPFmzm.js";import{_ as w,a as k}from"./el-layout._U-vZTft.js";import"./el-empty.CMLN1lgh.js";import"./el-loading-icon.Bh3RKCou.js";const $=w({__name:"index",setup(w){const $=a(),j=a(0);e((()=>{t((()=>{P()}))}));const x=a([]),P=async()=>{var a;null==(a=$.value)||a.resetPage()},H=s((()=>{const{windowHeight:a}=p();return a-j.value})),B=()=>{P()},C=a=>{$.value.isMore()&&($.value.loadingPage(),setTimeout((()=>{uni.$http.get("ucenter.visit/index",{page:a.page}).then((e=>{1==e.code?(1==a.page&&(x.value=[]),$.value.setData(e.data.total,e.data.list.length),x.value=x.value.concat(e.data.list)):-1==e.code&&(1==a.page&&e.data.list.length<=0&&(x.value=[]),$.value.emptyPage())}))}),100))};return(a,e)=>{const t=i(l("el-navbar"),h),s=m,p=g,w=i(l("el-refresh"),b),P=i(l("el-layout"),k);return o(),c(P,null,{default:r((()=>[d(t,{top:j.value,"onUpdate:top":e[0]||(e[0]=a=>j.value=a),placeholder:!0,fixed:!0,autoBack:!0,border:!0,title:"我的足迹"},null,8,["top"]),d(w,{ref_key:"refreshRef",ref:$,onRefresh:B,onScrolltolower:C,scrollHeight:H.value},{default:r((()=>[d(p,{class:"wrapper"},{default:r((()=>[d(p,{class:"goods-list"},{default:r((()=>[(o(!0),u(v,null,n(x.value,((a,e)=>(o(),c(p,{class:"goods-item",key:e,onClick:e=>(a=>{switch(a.category){case 0:y(`pages/goods/view?id=${a.goods_id}`);break;case 1:y(`pages/activity/group/view?id=${a.activity_id}`);break;case 2:y(`pages/activity/second/view?id=${a.activity_id}`);break;case 3:y(`pages/activity/bargain/view?id=${a.activity_id}`);break;case 4:y(`pages/activity/discount/view?id=${a.activity_id}`);break;case 5:y(`pages/activity/limit/view?id=${a.activity_id}`);break;case 6:y(`pages/activity/point/view?id=${a.activity_id}`)}})(a)},{default:r((()=>[d(p,{class:"thumb_image"},{default:r((()=>[d(s,{src:a.photo},null,8,["src"])])),_:2},1024),d(p,{class:"info"},{default:r((()=>[d(p,{class:"title"},{default:r((()=>[_(f(a.title),1)])),_:2},1024),d(p,{class:"bottom"},{default:r((()=>[d(p,null,{default:r((()=>[_("￥"+f(a.price),1)])),_:2},1024)])),_:2},1024)])),_:2},1024)])),_:2},1032,["onClick"])))),128))])),_:1})])),_:1})])),_:1},8,["scrollHeight"])])),_:1})}}},[["__scopeId","data-v-44364e32"]]);export{$ as default};
//# sourceMappingURL=pages-ucenter-visit-index.CuLwWzf8.js.map
