评论:修正好评率,舍弃小数
parent
380b47e371
commit
52f8e217f3
|
|
@ -640,7 +640,7 @@
|
||||||
getProductReplyCount: function() {
|
getProductReplyCount: function() {
|
||||||
ProductCommentApi.getCommentStatistics(this.activity.spuId).then(res => {
|
ProductCommentApi.getCommentStatistics(this.activity.spuId).then(res => {
|
||||||
const count = res.data.goodCount + res.data.mediocreCount + res.data.negativeCount;
|
const count = res.data.goodCount + res.data.mediocreCount + res.data.negativeCount;
|
||||||
this.$set(this, 'replyChance', 100.0 * res.data.goodCount / count);
|
this.$set(this, 'replyChance', (100.0 * res.data.goodCount / count).toFixed(0));
|
||||||
this.$set(this, 'replyCount', count);
|
this.$set(this, 'replyCount', count);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -778,7 +778,7 @@
|
||||||
getProductReplyCount: function() {
|
getProductReplyCount: function() {
|
||||||
ProductCommentApi.getCommentStatistics(this.id).then(res => {
|
ProductCommentApi.getCommentStatistics(this.id).then(res => {
|
||||||
const count = res.data.goodCount + res.data.mediocreCount + res.data.negativeCount;
|
const count = res.data.goodCount + res.data.mediocreCount + res.data.negativeCount;
|
||||||
this.$set(this, 'replyChance', 100.0 * res.data.goodCount / count);
|
this.$set(this, 'replyChance', (100.0 * res.data.goodCount / count).toFixed(0));
|
||||||
this.$set(this, 'replyCount', count);
|
this.$set(this, 'replyCount', count);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue