|
|
@ -2,7 +2,7 @@
|
|
|
|
* @Author: ch
|
|
|
|
* @Author: ch
|
|
|
|
* @Date: 2022-06-24 11:43:04
|
|
|
|
* @Date: 2022-06-24 11:43:04
|
|
|
|
* @LastEditors: ch
|
|
|
|
* @LastEditors: ch
|
|
|
|
* @LastEditTime: 2022-06-30 14:27:38
|
|
|
|
* @LastEditTime: 2022-06-30 19:46:42
|
|
|
|
* @Description: file content
|
|
|
|
* @Description: file content
|
|
|
|
-->
|
|
|
|
-->
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
@ -22,7 +22,7 @@
|
|
|
|
<template v-else>
|
|
|
|
<template v-else>
|
|
|
|
<div class="top">
|
|
|
|
<div class="top">
|
|
|
|
<el-rate :value="commentDetail.commentScore" disabled/>
|
|
|
|
<el-rate :value="commentDetail.commentScore" disabled/>
|
|
|
|
<span class="time">{{commentDetail.createTime}}</span>
|
|
|
|
<span class="time">{{FormatDate(commentDetail.createTime, 'yyyy-mm-dd hh:ii')}}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<p class="sku">已购买:{{commentDetail.skuName}}</p>
|
|
|
|
<p class="sku">已购买:{{commentDetail.skuName}}</p>
|
|
|
|
<div class="ctx">{{commentDetail.commentContent}}</div>
|
|
|
|
<div class="ctx">{{commentDetail.commentContent}}</div>
|
|
|
@ -64,7 +64,7 @@
|
|
|
|
<li class="answer--item" v-for="(item, idx) in answerCommentList" :key="idx">
|
|
|
|
<li class="answer--item" v-for="(item, idx) in answerCommentList" :key="idx">
|
|
|
|
<div class="answer--name">
|
|
|
|
<div class="answer--name">
|
|
|
|
<b>{{item.userName}} {{item.parentId !== commentDetail.id ? ` 回复 ${item.parentUserName}` : ''}}:</b>
|
|
|
|
<b>{{item.userName}} {{item.parentId !== commentDetail.id ? ` 回复 ${item.parentUserName}` : ''}}:</b>
|
|
|
|
<span>{{item.createTime}}</span>
|
|
|
|
<span>{{FormatDate(item.createTime, 'yyyy-mm-dd hh:ii')}}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<p class="answer--ctx">{{item.commentContent}}</p>
|
|
|
|
<p class="answer--ctx">{{item.commentContent}}</p>
|
|
|
|
<span class="answer--answer" @click="handleAnswer(item)">回复</span>
|
|
|
|
<span class="answer--answer" @click="handleAnswer(item)">回复</span>
|
|
|
@ -87,7 +87,7 @@
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import BsCommentFollowInfo from './BsCommentFollowInfo.vue';
|
|
|
|
import BsCommentFollowInfo from './BsCommentFollowInfo.vue';
|
|
|
|
import {ApiPostComment, ApiPutCommentUseful} from '@/plugins/api/comment';
|
|
|
|
import {ApiPostComment, ApiPutCommentUseful} from '@/plugins/api/comment';
|
|
|
|
import {Debounce } from '@/plugins/utils';
|
|
|
|
import {Debounce, FormatDate } from '@/plugins/utils';
|
|
|
|
import UiImgs from './UiImgs.vue';
|
|
|
|
import UiImgs from './UiImgs.vue';
|
|
|
|
import UiButton from './UiButton.vue';
|
|
|
|
import UiButton from './UiButton.vue';
|
|
|
|
import BsCommentSubmit from './BsCommentSubmit.vue';
|
|
|
|
import BsCommentSubmit from './BsCommentSubmit.vue';
|
|
|
@ -159,6 +159,7 @@ export default {
|
|
|
|
this.answerCommentList = this.commentDetail.answerCommentList || [];
|
|
|
|
this.answerCommentList = this.commentDetail.answerCommentList || [];
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods : {
|
|
|
|
methods : {
|
|
|
|
|
|
|
|
FormatDate,
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 评价成功后,抛出事件,方便父组件做数据处理
|
|
|
|
* 评价成功后,抛出事件,方便父组件做数据处理
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -289,6 +290,10 @@ export default {
|
|
|
|
display: flex;
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
justify-content: space-between;
|
|
|
|
margin-bottom: 10px;
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
|
|
|
/deep/.el-rate__icon{
|
|
|
|
|
|
|
|
margin-right: 0;
|
|
|
|
|
|
|
|
font-size: 24px;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.time, .sku{
|
|
|
|
.time, .sku{
|
|
|
|
color: #999;
|
|
|
|
color: #999;
|
|
|
@ -388,6 +393,12 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
&--btn{
|
|
|
|
&--btn{
|
|
|
|
height: 40px;
|
|
|
|
height: 40px;
|
|
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/deep/.ui-button__disabled{
|
|
|
|
|
|
|
|
background: #eee;
|
|
|
|
|
|
|
|
color: #999;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|