feat/info-comment-jump

This commit is contained in:
zzc
2026-06-25 07:35:36 +08:00
parent 8d2337e5b7
commit 4fb8a05f8d
4 changed files with 149 additions and 6 deletions

View File

@@ -294,9 +294,8 @@ const resolveActionText = (item) => {
};
const resolveJumpText = (item) => {
if(item.title.includes("已提交审核") || item.title.includes("未通过")) return "";
if(item.title.includes("已提交审核") || item.title.includes("未通过") || item.title.includes("评分项")) return "";
if (item.itemId) return "查看评分详情";
if (item.topicId) return "查看话题";
return "查看消息";
};
@@ -405,9 +404,16 @@ const setItemReadState = (id, isRead = true) => {
};
const handleNavigate = (item) => {
const isCommentInteraction = item?.type === 'comment' || item?.type === 'comment_like';
const targetCommentId =
item?.commentId ||
(item?.targetType === 'comment' ? item?.targetId : '') ||
item?.metadata?.commentId ||
'';
if (item.itemId) {
uni.navigateTo({
url: `/pages/rating/detail?topicId=${item.topicId || ""}&itemId=${item.itemId}`,
url: `/pages/rating/detail?topicId=${item.topicId || ""}&itemId=${item.itemId}${isCommentInteraction && targetCommentId ? `&commentId=${targetCommentId}` : ""}`,
});
return;
}
@@ -438,7 +444,7 @@ const markSingleAsRead = async (item) => {
const handleItemTap = async (item) => {
await markSingleAsRead(item);
if(item.title.includes("未通过") || item.title.includes("已提交审核")) return
if(item.title.includes("未通过") || item.title.includes("已提交审核") || item.title.includes("评分项")) return
handleNavigate(item);
};