diff --git a/src/api/goods/comment.js b/src/api/goods/comment.js index 167dd21..e3841c7 100644 --- a/src/api/goods/comment.js +++ b/src/api/goods/comment.js @@ -2,7 +2,7 @@ * @Author: ch * @Date: 2022-06-15 17:55:43 * @LastEditors: ch - * @LastEditTime: 2022-06-17 18:13:27 + * @LastEditTime: 2022-06-23 17:21:28 * @Description: file content */ import request from '@/utils/request.js'; @@ -20,7 +20,7 @@ export const commentDetail = ({ id }) => method: 'get', }); -//获取评论列表 +//评论 export const commentAdd = (data) => request({ url: '/mall/comment/admin/comment', diff --git a/src/views/goods/comment/detail/index.vue b/src/views/goods/comment/detail/index.vue index d2688f5..6eccf4a 100644 --- a/src/views/goods/comment/detail/index.vue +++ b/src/views/goods/comment/detail/index.vue @@ -54,6 +54,22 @@

{{ detailData.followComment.commentContent }}

+ +
+ 商家回复 +
+ + +
暂无内容
+
全部回复({{ detailData.answerCommentList?.length || 0 }}条)
@@ -174,11 +190,8 @@ state.isSubmit = true; let data = { commentContent: state.commentContent, - commentType: 3, - parentId: state.reply.id || detailData.value.id, + parentId: detailData.value.id, originId: detailData.value.id, - userId: store.state.auth.userInfo.userId, - userType: 1, }; // 需要返回ID或对象 去登录用户的userName不对 const res = await store.dispatch('comment/add', data); @@ -188,8 +201,6 @@ detailData.value.answerCommentList.push({ ...res, isShow: true, - parentUserName: state.reply.userName, - userName: store.state.auth.userInfo.userName, }); };