This commit is contained in:
张成
2025-10-01 14:31:46 +08:00
parent 22d8a34c7b
commit ffc8995fc8

View File

@@ -19,6 +19,7 @@ interface MessageItem {
related_user_avatar?: string; related_user_avatar?: string;
related_user_nickname?: string; related_user_nickname?: string;
activity_image?: string; activity_image?: string;
jump_url?: string;
} }
// 消息分类类型 // 消息分类类型
@@ -81,9 +82,22 @@ const Message = () => {
}; };
// 处理查看详情 // 处理查看详情
const handleViewDetail = (messageId: string) => { const handleViewDetail = (message: MessageItem) => {
console.log("查看详情:", messageId);
// TODO: 根据消息类型跳转到对应详情页 if (!message.jump_url) {
console.log("暂无跳转链接");
return;
}
Taro.navigateTo({
url: message.jump_url,
}).catch(() => {
Taro.showToast({
title: "页面不存在",
icon: "none",
duration: 2000,
});
});
}; };
// 处理滚动到底部 // 处理滚动到底部
@@ -212,7 +226,7 @@ const Message = () => {
</View> </View>
<View className="card-footer"> <View className="card-footer">
<View className="footer-divider"></View> <View className="footer-divider"></View>
<View className="footer-action" onClick={() => handleViewDetail(message.id)}> <View className="footer-action" onClick={() => handleViewDetail(message)}>
<Text className="action-text"></Text> <Text className="action-text"></Text>
<View className="action-arrow"> <View className="action-arrow">