import{_ as t}from"./su-tabs.6f882e3d.js";import{B as a,o,C as n,f as e,g as i,w as s,ak as l,_ as p,q as r,n as u,p as m,r as g,F as c,i as d,u as _,l as y}from"./index-007bf156.js";import{_ as f}from"./s-empty.df9577ad.js";import{_ as j}from"./uni-load-more.4c025ab2.js";import{_ as b}from"./s-layout.19bedb43.js";import{c as x}from"./comment-item.c03a5202.js";import{_ as S}from"./_plugin-vue_export-helper.1b428a4d.js";import"./uni-badge.cf8b6051.js";/* empty css                                                                */import"./phone-international-input.3617e4e0.js";import"./useGoods.ac3bf93e.js";import"./uni-rate.73343205.js";import"./su-image.d90fd751.js";const k=S({__name:"list",setup(S){const k=a({id:0,type:[{type:0,name:"全部"},{type:1,name:"好评"},{type:2,name:"中评"},{type:3,name:"差评"}],currentTab:0,loadStatus:"",pagination:{list:[],total:0,pageNo:1,pageSize:10}});function v(t){k.currentTab=t.index,k.pagination.pageNo=1,k.pagination.list=[],k.pagination.total=0,h()}async function h(){k.loadStatus="loading";let t=await l.getCommentPage(k.id,k.pagination.pageNo,k.pagination.pageSize,k.type[k.currentTab].type);0===t.code&&(console.log(t),k.pagination.list=p.concat(k.pagination.list,t.data.list),k.pagination.total=t.data.total,k.loadStatus=k.pagination.list.length<k.pagination.total?"more":"noMore")}function C(){"noMore"!==k.loadStatus&&(k.pagination.pageNo++,h())}return o((t=>{k.id=t.id,h()})),n((()=>{C()})),(a,o)=>{const n=r(_("su-tabs"),t),l=y,p=r(_("s-empty"),f),S=r(_("uni-load-more"),j),h=r(_("s-layout"),b);return e(),i(h,{title:"全部评价"},{default:s((()=>[u(n,{list:k.type,scrollable:!1,onChange:v,current:k.currentTab},null,8,["list","current"]),u(l,{class:"ss-m-t-20"},{default:s((()=>[(e(!0),m(c,null,g(k.pagination.list,(t=>(e(),i(l,{class:"list-item",key:t},{default:s((()=>[u(x,{item:t},null,8,["item"])])),_:2},1024)))),128))])),_:1}),0===k.pagination.total?(e(),i(p,{key:0,text:"暂无数据",icon:"/static/data-empty.png"})):d("",!0),k.pagination.total>0?(e(),i(S,{key:1,status:k.loadStatus,"content-text":{contentdown:"上拉加载更多"},onClick:C},null,8,["status"])):d("",!0)])),_:1})}}},[["__scopeId","data-v-8e4f777b"]]);export{k as default};
