import{r as e,o as a,n as l,c as t,b as s,d as o,e as u,f as n,w as r,g as c,h as d,i,F as m,k as f,p,v as _,A as v,l as g,K as y,j as h,B as k}from"./index-DVkgSHpn.js";import{_ as j}from"./el-navbar.DVIyjZEN.js";import{_ as x}from"./el-refresh.CkIPFmzm.js";import{_ as b,a as w}from"./el-layout._U-vZTft.js";import"./el-empty.CMLN1lgh.js";import"./el-loading-icon.Bh3RKCou.js";const P=b({__name:"index",setup(b){const P=e(0),H=e(),B=e({});a((e=>{B.value=e,l((()=>{R()}))}));const C=e([]),R=async()=>{var e;null==(e=H.value)||e.resetPage()},S=t((()=>{const{windowHeight:e}=f();return e-P.value})),A=()=>{R()},D=e=>{H.value.isMore()&&(H.value.loadingPage(),setTimeout((()=>{uni.$http.get("goods.comments/index",{goods_id:B.value.id,type:B.value.type}).then((a=>{1==a.code?(1==e.page&&(C.value=[]),H.value.setData(a.data.total,a.data.list.length),C.value=C.value.concat(a.data.list)):-1==a.code&&(1==e.page&&a.data.list.length<=0&&(C.value=[]),H.value.emptyPage())}))}),100))};return(e,a)=>{const l=s(o("el-navbar"),j),t=k,f=p,b=s(o("el-refresh"),x),B=s(o("el-layout"),w);return u(),n(B,null,{default:r((()=>[c(l,{top:P.value,"onUpdate:top":a[0]||(a[0]=e=>P.value=e),placeholder:!0,fixed:!0,autoBack:!0,border:!0,title:"评价详情"},null,8,["top"]),c(b,{ref_key:"refreshRef",ref:H,onRefresh:A,onScrolltolower:D,scrollHeight:S.value},{default:r((()=>[c(f,{class:"wrapper"},{default:r((()=>[c(f,{class:"comments"},{default:r((()=>[c(f,{class:"comments-list"},{default:r((()=>[(u(!0),d(m,null,i(C.value,((a,l)=>(u(),n(f,{class:"comments-box",key:l},{default:r((()=>[c(f,{class:"top"},{default:r((()=>[c(f,{class:"avatar"},{default:r((()=>[c(f,{class:"image"},{default:r((()=>[c(t,{src:a.avatar},null,8,["src"])])),_:2},1024),c(f,{class:"username"},{default:r((()=>[c(f,null,{default:r((()=>[_(v(a.username),1)])),_:2},1024),g(y)(a.spec)?h("",!0):(u(),n(f,{key:0},{default:r((()=>[_(v(a.spec),1)])),_:2},1024))])),_:2},1024)])),_:2},1024),c(f,{class:"time"},{default:r((()=>[_(v(a.comment_time),1)])),_:2},1024)])),_:2},1024),c(f,{class:"comments-content"},{default:r((()=>[_(v(a.content)+" ",1),g(y)(a.image)?h("",!0):(u(),n(f,{key:0},{default:r((()=>[(u(!0),d(m,null,i(a.image,((l,s)=>(u(),n(t,{key:s,src:l,onClick:l=>e.jumpPic(a.image,s)},null,8,["src","onClick"])))),128))])),_:2},1024))])),_:2},1024),g(y)(a.reply_content)?h("",!0):(u(),n(f,{key:0,class:"comments-reply"},{default:r((()=>[c(f,{class:"reply"},{default:r((()=>[c(f,null,{default:r((()=>[_("商家回复：")])),_:1}),c(f,null,{default:r((()=>[_(v(a.reply_content),1)])),_:2},1024)])),_:2},1024)])),_:2},1024))])),_:2},1024)))),128))])),_:1})])),_:1})])),_:1})])),_:1},8,["scrollHeight"])])),_:1})}}},[["__scopeId","data-v-19441d9f"]]);export{P as default};
//# sourceMappingURL=pages-comments-index.CbRrgS_j.js.map
