import{O as s,t as a,x as e,i as o,o as t,j as r,w as l,a0 as d,h as i,I as n,e as p,k as u,F as c,z as m,u as f,B as _,l as g}from"./index-d4baa715.js";import{u as k}from"./usePage.48b817d3.js";import{d as x}from"./product.280a3345.js";import{E as y}from"./index.7dcbea25.js";import{L as j,a as h}from"./index.f7879302.js";import{F as v}from"./images.f0a6f614.js";import{G as L}from"./Goods.ed14922a.js";import{_ as w}from"./_plugin-vue_export-helper.1b428a4d.js";const b=w({__name:"index",props:{more:{type:Boolean,default:()=>!0}},setup(w,{expose:b}){const B=w,{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 b({executeRefresh:()=>{E()}}),(s,a)=>{const e=_;return o(P)?m("",!0):(t(),r(e,{key:0,class:"recommend-container"},{default:l((()=>[d(s.$slots,"head",{},(()=>[i(e,{class:"title-row"},{default:l((()=>[n(" 商品推荐 ")])),_:1})]),!0),o(P)?(t(),r(y,{key:1,iconSrc:o(v)},{default:l((()=>[n(" 暂时没有商品推荐哦~ ")])),_:1},8,["iconSrc"])):(t(),r(e,{key:0,class:"product-box"},{default:l((()=>[(t(!0),p(c,null,u(o(z),(s=>(t(),r(e,{key:s.name,class:"goods-col"},{default:l((()=>[(t(!0),p(c,null,u(s.data,(s=>(t(),r(e,{key:s.id,class:"product"},{default:l((()=>[i(L,{ratio:!0,goods:s,infoPadding:"20rpx"},{options:l((()=>[i(e,{class:"good-bottom"},{default:l((()=>[i(e,{class:"price"},{default:l((()=>[n(" ￥"+g(s.price),1)])),_:2},1024),i(e,{class:"sale"},{default:l((()=>[n(" 仅剩"+g(s.stock)+"件 ",1)])),_:2},1024)])),_:2},1024)])),_:2},1032,["goods"])])),_:2},1024)))),128))])),_:2},1024)))),128))])),_:1})),o(I)?(t(),r(j,{key:2})):m("",!0),o(G)?(t(),r(h,{key:3},{default:l((()=>[o(S)?(t(),p("span",{key:0,onClick:a[0]||(a[0]=s=>o(R)({url:"/pages/goodsList/goodsList"}))}," 浏览更多商品 ")):(t(),p(c,{key:1},[n(" 到底了~ ")],64))])),_:1})):m("",!0)])),_:3}))}}},[["__scopeId","data-v-8e2af78d"]]);export{b as R};
