修改评论数量

feature/comment-0620-ch
ch 2 years ago
parent a75e6b163c
commit 6892041093

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-06-21 16:01:19
* @LastEditors: ch
* @LastEditTime: 2022-06-28 21:11:53
* @LastEditTime: 2022-06-29 10:20:40
* @Description: file content
-->
<template>
@ -14,7 +14,7 @@
</view>
<view class="thumb--item" @click="$Router.push(`/goodsCommentDetail?id=${commentDetail.id}`)">
<u-icon name="chat"></u-icon>
<text>{{answerCount}}</text>
<text>{{commentDetail.replyCount}}</text>
</view>
</view>
</template>
@ -35,12 +35,6 @@ export default {
usefulCount : 0
}
},
computed : {
answerCount (){
const arr = this.commentDetail.answerCommentList || [];
return arr.length;
}
},
watch :{
commentDetail (){
this.isLike = this.commentDetail.isLike;

@ -15,9 +15,9 @@
<!-- <u-icon slot="btns" name="shopping-cart" size="30" color="#FF875B"></u-icon> -->
<!-- </BsCommentGoodsInfo> -->
</view>
<view class="reply-title">全部评论( {{answerCount}})</view>
<view class="reply-title">全部评论( {{detail.replyCount}})</view>
<view class="reply">
<template v-if="answerCount">
<template v-if="detail.replyCount">
<view class="reply--item" v-for="item in detail.answerCommentList" :key="item.id" @click="handleAnswer(item)">
<view class="reply--title">
<text>
@ -81,9 +81,6 @@ export default {
computed:{
placeholder(){
return this.answer ? `回复:${this.answer.userName}` : '说点什么吧?'
},
answerCount(){
return this.detail.answerCommentList ? this.detail.answerCommentList.length : 0
}
},
onShow(){

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-06-22 15:15:22
* @LastEditors: ch
* @LastEditTime: 2022-06-28 20:32:35
* @LastEditTime: 2022-06-29 10:20:34
* @Description: file content
-->
<template>
@ -36,7 +36,7 @@
</view>
<view class="thumb--item" @click="$Router.replace(`/goodsCommentDetail?id=${data.id}`)">
<u-icon color="#fff" name="chat"></u-icon>
<text>{{answerCount}}</text>
<text>{{data.replyCount}}</text>
</view>
</view>
</view>
@ -61,10 +61,6 @@ export default {
imgs(){
const arr = this.data.pictureUrl || [];
return arr.split(',')
},
answerCount (){
const arr = this.data.answerCommentList || []
return arr.length;
}
},
onShow(){

Loading…
Cancel
Save