import{_ as a}from"./s-score-card.470ae7b0.js";import{C as t,D as s,p as o,o as e,e as n,w as i,s as p,_ as l,b as d,i as r,f as _,h as c,F as u,k as g,d as m,m as y,u as f}from"./index-520dfaee.js";import{_ as j}from"./s-empty.b6c95127.js";import{_ as x}from"./uni-load-more.ba4f287c.js";import{a as k}from"./s-layout.5146c957.js";import"./useGoods.7c6b9280.js";/* empty css                                                                     */import"./_plugin-vue_export-helper.1b428a4d.js";/* empty css                                                                *//* empty css                                                                      */const v={__name:"score-shop",setup(v){const S=t({pagination:{data:[],current_page:1,total:1,last_page:1},loadStatus:""});async function b(a=1,t=5){S.loadStatus="loading";let s=await p.$api.app.scoreShop.list({list_rows:t,page:a});if(1===s.code){let a=l.concat(S.pagination.data,s.data.data);S.pagination={...s.data,data:a},S.pagination.current_page<S.pagination.last_page?S.loadStatus="more":S.loadStatus="noMore"}}function C(){"noMore"!==S.loadStatus&&b(S.pagination.current_page+1)}return s((()=>{C()})),o((()=>{b()})),(t,s)=>{const o=d(m("s-score-card"),a),l=y,v=d(m("s-empty"),j),b=d(m("uni-load-more"),x),h=d(m("s-layout"),k);return e(),n(h,{title:"积分商城"},{default:i((()=>[r(l,{class:"ss-p-20"},{default:i((()=>[(e(!0),_(u,null,c(S.pagination.data,(a=>(e(),n(l,{key:a.id,class:"ss-m-b-20"},{default:i((()=>[r(o,{size:"sl",data:a,priceColor:"#FF3000",onClick:t=>f(p).$router.go("/pages/goods/score",{id:a.id})},null,8,["data","onClick"])])),_:2},1024)))),128))])),_:1}),0===S.pagination.total?(e(),n(v,{key:0,icon:"/static/goods-empty.png",text:"暂无积分商品"})):g("",!0),S.pagination.total>0?(e(),n(b,{key:1,status:S.loadStatus,"content-text":{contentdown:"上拉加载更多"},onClick:C},null,8,["status"])):g("",!0)])),_:1})}}};export{v as default};
