import{_ as t}from"./su-tabs.1ce39404.js";import{v as a,o,x as e,e as n,f as i,w as s,_ as l,l as p,j as r,k as m,r as u,F as g,g as c,m as d,i as _}from"./index-9880b451.js";import{_ as y}from"./s-empty.74111684.js";import{_ as f}from"./uni-load-more.aac4524a.js";import{_ as j}from"./s-layout.dfc5b0b5.js";import{C as b,c as x}from"./comment-item.6bcd8e43.js";import{_ as S}from"./_plugin-vue_export-helper.1b428a4d.js";/* empty css                                                                */import"./uni-rate.ac7990fe.js";import"./su-image.53d60b59.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:1}});function v(t){k.currentTab=t.index,k.pagination.pageNo=1,k.pagination.list=[],k.pagination.total=0,C()}async function C(){k.loadStatus="loading";let t=await b.getCommentPage(k.id,k.pagination.pageNo,k.pagination.pageSize,k.type[k.currentTab].type);0===t.code&&(k.pagination.list=l.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 N(){"noMore"!==k.loadStatus&&(k.pagination.pageNo++,C())}return o((t=>{k.id=t.id,C()})),e((()=>{N()})),(a,o)=>{const e=p(d("su-tabs"),t),l=_,b=p(d("s-empty"),y),S=p(d("uni-load-more"),f),C=p(d("s-layout"),j);return n(),i(C,{title:"全部评价"},{default:s((()=>[r(e,{list:k.type,scrollable:!1,onChange:v,current:k.currentTab},null,8,["list","current"]),r(l,{class:"ss-m-t-20"},{default:s((()=>[(n(!0),m(g,null,u(k.pagination.list,(t=>(n(),i(l,{class:"list-item",key:t},{default:s((()=>[r(x,{item:t},null,8,["item"])])),_:2},1024)))),128))])),_:1}),0===k.pagination.total?(n(),i(b,{key:0,text:"暂无数据",icon:"/static/data-empty.png"})):c("",!0),k.pagination.total>0?(n(),i(S,{key:1,status:k.loadStatus,"content-text":{contentdown:"上拉加载更多"},onClick:N},null,8,["status"])):c("",!0)])),_:1})}}},[["__scopeId","data-v-87b3c1af"]]);export{k as default};
