feat/info-comment-jump
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user