import{O as s,t as a,x as e,o,j as t,w as r,a0 as l,h as d,I as i,i as n,e as u,k as c,F as p,z as m,u as f,B as _,l as g}from"./index-90c12cc1.js";import{u as k}from"./usePage.8865205f.js";import{d as x}from"./product.4783a646.js";import{E as y}from"./index.ed915e92.js";import{L as j,a as h}from"./index.867e23f4.js";import{F as v}from"./images.cf3befb9.js";import{G as L}from"./Goods.94b8dae8.js";import{_ as b}from"./_plugin-vue_export-helper.1b428a4d.js";const w=b({__name:"index",props:{more:{type:Boolean,default:()=>!0}},setup(b,{expose:w}){const B=b,{refresh:E,dataList:F,loadend:G,loading:I,listEmpty:P}=k(x),{push:R}=f();s((()=>{E()}));const{more:S}=a(B),z=e((()=>[{name:"all",data:F.value.filter(((s,a)=>a%2==0))},{name:"right",data:F.value.filter(((s,a)=>a%2!=0))}]));return w({executeRefresh:()=>{E()}}),(s,a)=>{const e=_;return o(),t(e,{class:"recommend-container"},{default:r((()=>[l(s.$slots,"head",{},(()=>[d(e,{class:"title-row"},{default:r((()=>[i(" 商品推荐 ")])),_:1})]),!0),n(P)?(o(),t(y,{key:1,iconSrc:n(v)},{default:r((()=>[i(" 暂时没有商品推荐哦~ ")])),_:1},8,["iconSrc"])):(o(),t(e,{key:0,class:"product-box"},{default:r((()=>[(o(!0),u(p,null,c(n(z),(s=>(o(),t(e,{key:s.name,class:"goods-col"},{default:r((()=>[(o(!0),u(p,null,c(s.data,(s=>(o(),t(e,{key:s.id,class:"product"},{default:r((()=>[d(L,{ratio:!0,goods:s,infoPadding:"20rpx"},{options:r((()=>[d(e,{class:"good-bottom"},{default:r((()=>[d(e,{class:"price"},{default:r((()=>[i(" ￥"+g(s.price),1)])),_:2},1024),d(e,{class:"sale"},{default:r((()=>[i(" 仅剩"+g(s.stock)+"件 ",1)])),_:2},1024)])),_:2},1024)])),_:2},1032,["goods"])])),_:2},1024)))),128))])),_:2},1024)))),128))])),_:1})),n(I)?(o(),t(j,{key:2})):m("",!0),n(G)?(o(),t(h,{key:3},{default:r((()=>[n(S)?(o(),u("span",{key:0,onClick:a[0]||(a[0]=s=>n(R)({url:"/pages/goodsList/goodsList"}))}," 浏览更多商品 ")):(o(),u(p,{key:1},[i(" 到底了~ ")],64))])),_:1})):m("",!0)])),_:3})}}},[["__scopeId","data-v-e87c75fe"]]);export{w as R};
