|
|
|
@ -46,28 +46,28 @@
|
|
|
|
|
:src="item"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<template v-if="state.detailData.followComment">
|
|
|
|
|
<template v-if="state.followComment">
|
|
|
|
|
<b class="comment--title">
|
|
|
|
|
用户追评
|
|
|
|
|
<small>{{ state.detailData.followComment.createTime }}</small>
|
|
|
|
|
<small>{{ state.followComment.createTime }}</small>
|
|
|
|
|
</b>
|
|
|
|
|
<p class="comment--ctx">{{ state.detailData.followComment.commentContent }}</p>
|
|
|
|
|
<p class="comment--ctx">{{ state.followComment.commentContent }}</p>
|
|
|
|
|
</template>
|
|
|
|
|
</div>
|
|
|
|
|
<template v-if="state.detailData.merchantComment">
|
|
|
|
|
<template v-if="state.merchantComment">
|
|
|
|
|
<div class="title">
|
|
|
|
|
<b>商家({{ state.detailData.merchantComment.userName }}) 回复:</b>
|
|
|
|
|
<span>{{ state.detailData.merchantComment.createTime }}</span>
|
|
|
|
|
<b>商家({{ state.merchantComment.userName }}) 回复:</b>
|
|
|
|
|
<span>{{ state.merchantComment.createTime }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<p class="reply--ctx">{{ state.detailData.merchantComment.commentContent }}</p>
|
|
|
|
|
<p class="reply--ctx">{{ state.merchantComment.commentContent }}</p>
|
|
|
|
|
<br />
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<div class="title">
|
|
|
|
|
<b>全部回复({{ state.detailData.answerCommentList?.length || 0 }}条)</b>
|
|
|
|
|
<b>全部回复({{ state.answerCommentList?.length || 0 }}条)</b>
|
|
|
|
|
</div>
|
|
|
|
|
<ul class="reply" v-if="state.detailData.answerCommentList?.length">
|
|
|
|
|
<li class="reply--item" v-for="item in state.detailData.answerCommentList" :key="item.id">
|
|
|
|
|
<ul class="reply" v-if="state.answerCommentList?.length">
|
|
|
|
|
<li class="reply--item" v-for="item in state.answerCommentList" :key="item.id">
|
|
|
|
|
<div class="reply--title">
|
|
|
|
|
{{ item.userName }}
|
|
|
|
|
<span v-if="item.parentId !== state.detailData.id">回复 {{ item.parentUserName }}:</span>
|
|
|
|
@ -95,7 +95,7 @@
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
<div class="reply__emtpy" v-else>暂无内容</div>
|
|
|
|
|
<div class="footer" v-if="!state.detailData.merchantComment">
|
|
|
|
|
<div class="footer" v-if="!state.merchantComment">
|
|
|
|
|
<textarea
|
|
|
|
|
class="footer--textarea"
|
|
|
|
|
ref="$textarea"
|
|
|
|
@ -124,6 +124,9 @@
|
|
|
|
|
reply: {},
|
|
|
|
|
isSubmit: false,
|
|
|
|
|
detailData: {},
|
|
|
|
|
answerCommentList: [],
|
|
|
|
|
followComment: {},
|
|
|
|
|
merchantComment: {},
|
|
|
|
|
});
|
|
|
|
|
//不允许提交状态
|
|
|
|
|
const sbumitDisabled = computed(() => {
|
|
|
|
@ -136,9 +139,16 @@
|
|
|
|
|
|
|
|
|
|
const getDetail = async () => {
|
|
|
|
|
state.detailData = {};
|
|
|
|
|
state.answerCommentList = [];
|
|
|
|
|
state.followComment = {};
|
|
|
|
|
state.merchantComment = {};
|
|
|
|
|
|
|
|
|
|
const res = await store.dispatch('comment/getDetail', route.params.id);
|
|
|
|
|
if (res) {
|
|
|
|
|
state.detailData = _.cloneDeep(store.state.comment.detail);
|
|
|
|
|
state.answerCommentList = state.detailData.answerCommentList;
|
|
|
|
|
state.followComment = state.detailData.followComment;
|
|
|
|
|
state.merchantComment = state.detailData.merchantComment;
|
|
|
|
|
if (state.detailData.pictureUrl) {
|
|
|
|
|
state.detailData.pictureUrl = state.detailData.pictureUrl.split(',');
|
|
|
|
|
}
|
|
|
|
@ -191,7 +201,7 @@
|
|
|
|
|
ElMessage.success('回复成功!');
|
|
|
|
|
state.isSubmit = false;
|
|
|
|
|
state.commentContent = '';
|
|
|
|
|
state.detailData.answerCommentList.push({
|
|
|
|
|
state.answerCommentList.push({
|
|
|
|
|
...res,
|
|
|
|
|
isShow: true,
|
|
|
|
|
});
|
|
|
|
|