import{_ as t}from"./su-tabs.8e3b073b.js";import{y as a,o,z as n,e,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 y}from"./index-68dd960a.js";import{_}from"./s-empty.fd15ca2f.js";import{_ as f}from"./uni-load-more.49bf8042.js";import{_ as j}from"./s-layout.454a15cd.js";import{C as b,c as x}from"./comment-item.3706413e.js";import{_ as S}from"./_plugin-vue_export-helper.1b428a4d.js";import"./uni-badge.ad675ab6.js";/* empty css                                                                */import"./phone-international-input.471da4c0.js";import"./uni-rate.b9c9f3b5.js";import"./su-image.2230c66c.js";const h=S({__name:"list",setup(S){const h=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 k(t){h.currentTab=t.index,h.pagination.pageNo=1,h.pagination.list=[],h.pagination.total=0,v()}async function v(){h.loadStatus="loading";let t=await b.getCommentPage(h.id,h.pagination.pageNo,h.pagination.pageSize,h.type[h.currentTab].type);0===t.code&&(console.log(t),h.pagination.list=l.concat(h.pagination.list,t.data.list),h.pagination.total=t.data.total,h.loadStatus=h.pagination.list.length<h.pagination.total?"more":"noMore")}function w(){"noMore"!==h.loadStatus&&(h.pagination.pageNo++,v())}return o((t=>{h.id=t.id,v()})),n((()=>{w()})),(a,o)=>{const n=p(d("su-tabs"),t),l=y,b=p(d("s-empty"),_),S=p(d("uni-load-more"),f),v=p(d("s-layout"),j);return e(),i(v,{title:"全部评价"},{default:s((()=>[r(n,{list:h.type,scrollable:!1,onChange:k,current:h.currentTab},null,8,["list","current"]),r(l,{class:"ss-m-t-20"},{default:s((()=>[(e(!0),m(g,null,u(h.pagination.list,(t=>(e(),i(l,{class:"list-item",key:t},{default:s((()=>[r(x,{item:t},null,8,["item"])])),_:2},1024)))),128))])),_:1}),0===h.pagination.total?(e(),i(b,{key:0,text:"暂无数据",icon:"/static/data-empty.png"})):c("",!0),h.pagination.total>0?(e(),i(S,{key:1,status:h.loadStatus,"content-text":{contentdown:"上拉加载更多"},onClick:w},null,8,["status"])):c("",!0)])),_:1})}}},[["__scopeId","data-v-8e4f777b"]]);export{h as default};
