chunk-4abea3da.aa65e66d.js 2.8 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4abea3da"],{"80fd":function(t,a,e){"use strict";var n=e("9efa"),i=e.n(n);i.a},"9efa":function(t,a,e){},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("cc57"),e("edc3")),r=e("73f5"),o=e("3a5e"),c="EvaluateList",l={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===c&&(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=l,u=(e("80fd"),e("623f")),p=Object(u["a"])(d,n,i,!1,null,"33370719",null);a["default"]=p.exports}}]);
  2. //# sourceMappingURL=chunk-4abea3da.aa65e66d.js.map