diff --git a/src/api/comment/index.ts b/src/api/comment/index.ts
index e855d40..54d642f 100644
--- a/src/api/comment/index.ts
+++ b/src/api/comment/index.ts
@@ -26,7 +26,7 @@ export const commentSubmitApi = (params: any) => {
* @param params
*/
export const replySubmitApi = (params: any) => {
- return service.Post('/api/auth/reply/submit', {
+ return service.Post('/api/auth/comment/reply/submit', {
content: params.content,
images: params.images,
topic_id: params.topic_id,
@@ -73,7 +73,7 @@ export const commentListApi = (params: any) => {
* @param params
*/
export const replyListApi = (params: any) => {
- return service.Post('/api/auth/reply/list', {
+ return service.Post('/api/auth/comment/reply/list', {
page: params.page,
size: params.size,
comment_id: params.comment_id,
@@ -97,7 +97,7 @@ export const replyListApi = (params: any) => {
* @param params
*/
export const replyReplySubmitApi = (params: any) => {
- return service.Post('/api/auth/reply/reply/submit', {
+ return service.Post('/api/auth/comment/reply/reply/submit', {
content: params.content,
images: params.images,
topic_id: params.topic_id,
@@ -139,7 +139,7 @@ export const commentLikeApi = (params: any) => {
* @param params
*/
export const cancelCommentLikeApi = (params: any) => {
- return service.Post('/api/auth/comment/cancel_like', {
+ return service.Post('/api/auth/comment/dislike', {
comment_id: params.comment_id,
topic_id: params.topic_id,
diff --git a/src/components/CommentReply/src/CommentInput/CommentInput.vue b/src/components/CommentReply/src/CommentInput/CommentInput.vue
index 2581333..e785d85 100644
--- a/src/components/CommentReply/src/CommentInput/CommentInput.vue
+++ b/src/components/CommentReply/src/CommentInput/CommentInput.vue
@@ -171,7 +171,7 @@ async function commentSubmit(point: any) {
key: comment.slideCaptchaData.key,
};
const result: any = await commentSubmitApi(commentParams);
- if (result.code === 200 && result.success) {
+ if (result.code === 200) {
const tmpData: any = {
user_id: user.user.uid,
content: result.data.content,
diff --git a/src/components/CommentReply/src/CommentList/CommentList.vue b/src/components/CommentReply/src/CommentList/CommentList.vue
index 9753f81..52dd44c 100644
--- a/src/components/CommentReply/src/CommentList/CommentList.vue
+++ b/src/components/CommentReply/src/CommentList/CommentList.vue
@@ -98,7 +98,9 @@
:disabled="item.reply_count === 0"
v-show="item.reply_count > 0"
class="reply-action-btn">
- 查看{{ item.reply_count >= 99 ? '99+' : item.reply_count }}条回复
+ {{ t('comment.view') }}{{
+ item.reply_count >= 99 ? '99+' : item.reply_count
+ }}{{ t("comment.replies") }}
@{{ child.reply_username }}
+ class="reply-at">@{{ child.reply_nickname }}
Lv.5
diff --git a/src/components/CommentReply/src/ReplyReplyInput/ReplyReply.vue b/src/components/CommentReply/src/ReplyReplyInput/ReplyReply.vue
index 406981a..6b5ed88 100644
--- a/src/components/CommentReply/src/ReplyReplyInput/ReplyReply.vue
+++ b/src/components/CommentReply/src/ReplyReplyInput/ReplyReply.vue
@@ -189,7 +189,7 @@ async function replyReplySubmit(point: any) {
key: comment.slideCaptchaData.key,
};
const result: any = await replyReplySubmitApi(replyParams);
- if (result.code === 200 && result.success) {
+ if (result.code === 200) {
const tmpData: any = {
id: result.data.id,
content: result.data.content,
diff --git a/src/locales/language/en.ts b/src/locales/language/en.ts
index 1d9e2db..7171472 100644
--- a/src/locales/language/en.ts
+++ b/src/locales/language/en.ts
@@ -104,5 +104,7 @@ export default {
loadingMore: 'loading more',
noMore: 'no more',
reportSeletion: 'Please select the reason for reporting the comment',
+ view: 'look',
+ replies: 'replies',
}
};
diff --git a/src/locales/language/zh.ts b/src/locales/language/zh.ts
index 8111662..f1263f7 100644
--- a/src/locales/language/zh.ts
+++ b/src/locales/language/zh.ts
@@ -103,6 +103,8 @@ export default {
loadingMore: '加载更多',
noMore: '没有更多了',
reportSeletion: '请选择举报原因',
+ view : '查看',
+ replies: '条回复',
}
};
diff --git a/src/store/modules/commentStore.ts b/src/store/modules/commentStore.ts
index 6df5c88..02e4350 100644
--- a/src/store/modules/commentStore.ts
+++ b/src/store/modules/commentStore.ts
@@ -52,7 +52,7 @@ export const useCommentStore = defineStore(
commentList.value = {} as Comment;
// 获取评论列表
const result: any = await commentListApi(data);
- if (result.code === 200 && result.success && result.data) {
+ if (result.code === 200 && result.data) {
commentList.value = result.data;
commentLoading.value = false;
commentList.value.comments.forEach((item: any) => {
@@ -98,7 +98,7 @@ export const useCommentStore = defineStore(
replyList.value = {} as Comment;
// 获取评论列表
const result: any = await replyListApi(params);
- if (result.code === 200 && result.success && result.data) {
+ if (result.code === 200 && result.data) {
replyList.value = result.data;
replyLoading.value = false;
} else {
@@ -116,7 +116,7 @@ export const useCommentStore = defineStore(
topic_id: data.topic_id,
};
const result: any = await commentLikeApi(params);
- if (result.code !== 200 || !result.success) {
+ if (result.code !== 200) {
message.error(result.message);
return false;
}
@@ -133,7 +133,7 @@ export const useCommentStore = defineStore(
topic_id: data.topic_id,
};
const result: any = await cancelCommentLikeApi(params);
- if (result.code !== 200 || !result.success) {
+ if (result.code !== 200) {
message.error(result.message);
return false;
}
diff --git a/src/types/comment.d.ts b/src/types/comment.d.ts
index fc18f7d..78bb6bd 100644
--- a/src/types/comment.d.ts
+++ b/src/types/comment.d.ts
@@ -15,7 +15,7 @@ interface CommentContent {
location: string;
operating_system: string;
reply_count: number;
- reply_username: string;
+ reply_nickname: string;
reply_id: string;
reply_user: string;
topic_id: string;