添加程序选择

This commit is contained in:
张成
2025-11-23 00:24:31 +08:00
parent 17015c0cca
commit 8b3f6c5a3a
18 changed files with 1296 additions and 47 deletions

View File

@@ -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);
}
}