添加程序选择
This commit is contained in:
@@ -10,6 +10,7 @@ import Taro from "@tarojs/taro";
|
||||
import dayjs from "dayjs";
|
||||
import classnames from "classnames";
|
||||
import CommentServices from "@/services/commentServices";
|
||||
import messageService from "@/services/messageService";
|
||||
import { delay } from "@/utils";
|
||||
import type {
|
||||
BaseComment,
|
||||
@@ -308,6 +309,18 @@ export default forwardRef(function Comments(
|
||||
await getComments(1);
|
||||
if (message_id) {
|
||||
scrollToComment();
|
||||
// 标记评论已读
|
||||
markCommentAsRead();
|
||||
}
|
||||
}
|
||||
|
||||
// 标记评论已读
|
||||
async function markCommentAsRead() {
|
||||
if (!message_id) return;
|
||||
try {
|
||||
await messageService.markAsRead('comment', [message_id]);
|
||||
} catch (e) {
|
||||
console.error("标记评论已读失败:", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user