12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5bfab075"],{"1ef4":function(t,a,e){},"80fd":function(t,a,e){"use strict";var n=e("1ef4"),i=e.n(n);i.a},f40b:function(t,a,e){"use strict";e.r(a);var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{ref:"container",staticClass:"evaluate-list"},[e("div",{staticClass:"header"},[e("div",{staticClass:"generalComment acea-row row-between-wrapper"},[e("div",{staticClass:"acea-row row-middle font-color-red"},[e("div",{staticClass:"evaluate"},[t._v("评分")]),e("div",{staticClass:"start",class:"star"+t.replyData.reply_star})]),e("div",[e("span",{staticClass:"font-color-red"},[t._v(t._s(t.replyData.reply_chance||0)+"%")]),t._v("好评率\n ")])]),e("div",{staticClass:"nav acea-row row-middle"},t._l(t.navList,function(a,n){return e("div",{key:n,staticClass:"acea-row row-center-wrapper",on:{click:function(a){return t.changeType(n)}}},[a.num?e("div",{staticClass:"item",class:t.currentActive===n?"bg-color-red":""},[t._v("\n "+t._s(a.evaluate)+"("+t._s(a.num)+")\n ")]):t._e()])}),0)]),e("UserEvaluation",{attrs:{reply:t.reply}}),e("Loading",{attrs:{loaded:t.loadend,loading:t.loading}})],1)},i=[],s=(e("7f7f"),e("edc3")),r=e("73f5"),o=e("3a5e"),l="EvaluateList",c={name:"EvaluateList",components:{UserEvaluation:s["a"],Loading:o["a"]},props:{},data:function(){return{product_id:0,replyData:{},navList:[{evaluate:"全部",num:0},{evaluate:"好评",num:0},{evaluate:"中评",num:0},{evaluate:"差评",num:0}],currentActive:0,page:1,limit:8,reply:[],loadTitle:"",loading:!1,loadend:!1}},watch:{$route:function(t){t.name===l&&(this.product_id=this.$route.params.id,this.loadend=!1,this.page=1,this.$set(this,"reply",[]),this.getProductReplyCount(),this.getProductReplyList())}},mounted:function(){var t=this;this.product_id=this.$route.params.id,this.getProductReplyCount(),this.getProductReplyList(),this.$scroll(this.$refs.container,function(){!t.loading&&t.getProductReplyList()})},methods:{getProductReplyCount:function(){var t=this;Object(r["j"])(t.product_id).then(function(a){t.$set(t,"replyData",a.data),t.navList[0].num=a.data.sum_count,t.navList[1].num=a.data.good_count,t.navList[2].num=a.data.in_count,t.navList[3].num=a.data.poor_count})},getProductReplyList:function(){var t=this;if(!t.loading&&!t.loadend){t.loading=!0;var a={page:t.page,limit:t.limit,type:t.currentActive};Object(r["k"])(t.product_id,a).then(function(a){t.loading=!1,t.reply.push.apply(t.reply,a.data),t.loadend=a.data.length<t.limit,t.page=t.page+1})}},changeType:function(t){var a=this;a.currentActive=t,a.page=1,a.loadend=!1,a.$set(a,"reply",[]),a.getProductReplyList()}}},d=c,u=(e("80fd"),e("2877")),p=Object(u["a"])(d,n,i,!1,null,"33370719",null);a["default"]=p.exports}}]);
- //# sourceMappingURL=chunk-5bfab075.79191bcc.js.map
|