diff --git a/pages/activity/goods_seckill_details/index.vue b/pages/activity/goods_seckill_details/index.vue index ca5eaf34..74fde159 100644 --- a/pages/activity/goods_seckill_details/index.vue +++ b/pages/activity/goods_seckill_details/index.vue @@ -640,7 +640,7 @@ getProductReplyCount: function() { ProductCommentApi.getCommentStatistics(this.activity.spuId).then(res => { 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); }); }, diff --git a/pages/goods_details/index.vue b/pages/goods_details/index.vue index db7e67ef..91647fc9 100644 --- a/pages/goods_details/index.vue +++ b/pages/goods_details/index.vue @@ -778,7 +778,7 @@ getProductReplyCount: function() { ProductCommentApi.getCommentStatistics(this.id).then(res => { 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); }); },