"use strict";const e=require("../../../common/vendor.js"),t=require("../../../sheep/api/product/comment.js");if(require("../../../sheep/request/index.js"),require("../../../sheep/config/index.js"),require("../../../sheep/store/index.js"),require("../../../sheep/store/app.js"),require("../../../sheep/api/promotion/diy.js"),require("../../../sheep/platform/index.js"),require("../../../sheep/platform/provider/wechat/index.js"),require("../../../sheep/platform/provider/wechat/miniProgram.js"),require("../../../sheep/api/member/auth.js"),require("../../../sheep/api/member/social.js"),require("../../../sheep/api/member/user.js"),require("../../../sheep/platform/provider/apple/index.js"),require("../../../sheep/platform/share.js"),require("../../../sheep/router/index.js"),require("../../../sheep/hooks/useModal.js"),require("../../../sheep/helper/index.js"),require("../../../sheep/helper/test.js"),require("../../../sheep/helper/digit.js"),require("../../../sheep/index.js"),require("../../../sheep/url/index.js"),require("../../../sheep/config/zIndex.js"),require("../../../sheep/api/member/signin.js"),require("../../../sheep/helper/throttle.js"),require("../../../sheep/platform/pay.js"),require("../../../sheep/api/pay/order.js"),require("../../../sheep/store/user.js"),require("../../../sheep/store/cart.js"),require("../../../sheep/api/trade/cart.js"),require("../../../sheep/api/pay/wallet.js"),require("../../../sheep/api/trade/order.js"),require("../../../sheep/api/promotion/coupon.js"),require("../../../sheep/store/sys.js"),require("../../../sheep/store/modal.js"),!Array){(e.resolveComponent("su-tabs")+e.resolveComponent("s-empty")+e.resolveComponent("uni-load-more")+e.resolveComponent("s-layout"))()}Math||((()=>"../../../sheep/ui/su-tabs/su-tabs.js")+r+(()=>"../../../sheep/components/s-empty/s-empty.js")+(()=>"../../../uni_modules/uni-load-more/components/uni-load-more/uni-load-more.js")+(()=>"../../../sheep/components/s-layout/s-layout.js"))();const r=()=>"../components/detail/comment-item.js",i={__name:"list",setup(r){const i=e.reactive({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 s(e){i.currentTab=e.index,i.pagination.pageNo=1,i.pagination.list=[],i.pagination.total=0,o()}async function o(){i.loadStatus="loading";let r=await t.CommentApi.getCommentPage(i.id,i.pagination.pageNo,i.pagination.pageSize,i.type[i.currentTab].type);0===r.code&&(console.log(r),i.pagination.list=e._.concat(i.pagination.list,r.data.list),i.pagination.total=r.data.total,i.loadStatus=i.pagination.list.length<i.pagination.total?"more":"noMore")}function a(){"noMore"!==i.loadStatus&&(i.pagination.pageNo++,o())}return e.onLoad((e=>{i.id=e.id,o()})),e.onReachBottom((()=>{a()})),(t,r)=>e.e({a:e.o(s),b:e.p({list:i.type,scrollable:!1,current:i.currentTab}),c:e.f(i.pagination.list,((t,r,i)=>({a:"8e4f777b-2-"+i+",8e4f777b-0",b:e.p({item:t}),c:t}))),d:0===i.pagination.total},0===i.pagination.total?{e:e.p({text:"暂无数据",icon:"/static/data-empty.png"})}:{},{f:i.pagination.total>0},i.pagination.total>0?{g:e.o(a),h:e.p({status:i.loadStatus,"content-text":{contentdown:"上拉加载更多"}})}:{},{i:e.p({title:"全部评价"})})}},s=e._export_sfc(i,[["__scopeId","data-v-8e4f777b"]]);wx.createPage(s);
