Reduce noisy runtime logging in frontend flows.
This keeps chat, notification, and post interactions cleaner in production while preserving error-level visibility.
This commit is contained in:
@@ -122,7 +122,6 @@ export const PostDetailScreen: React.FC = () => {
|
||||
try {
|
||||
// 从API获取帖子详情
|
||||
const postData = await postService.getPost(postId);
|
||||
console.log('[PostDetailScreen] postData:', JSON.stringify(postData, null, 2));
|
||||
if (postData) {
|
||||
setPost(postData);
|
||||
// 初始化关注状态
|
||||
@@ -141,11 +140,9 @@ export const PostDetailScreen: React.FC = () => {
|
||||
|
||||
// 如果是投票帖子,立即加载投票数据
|
||||
if (postData.is_vote) {
|
||||
console.log('[PostDetailScreen] is_vote is true, loading vote data...');
|
||||
setIsVoteLoading(true);
|
||||
try {
|
||||
const voteData = await voteService.getVoteResult(postId);
|
||||
console.log('[PostDetailScreen] voteData:', JSON.stringify(voteData, null, 2));
|
||||
if (voteData) {
|
||||
setVoteResult(voteData);
|
||||
}
|
||||
@@ -154,8 +151,6 @@ export const PostDetailScreen: React.FC = () => {
|
||||
} finally {
|
||||
setIsVoteLoading(false);
|
||||
}
|
||||
} else {
|
||||
console.log('[PostDetailScreen] is_vote is false or undefined:', postData.is_vote);
|
||||
}
|
||||
} else {
|
||||
// 如果API返回空,尝试从store中获取
|
||||
@@ -357,7 +352,7 @@ export const PostDetailScreen: React.FC = () => {
|
||||
// 分享帖子
|
||||
const handleShare = useCallback(() => {
|
||||
// TODO: 实现分享功能
|
||||
console.log('Share post:', post?.id);
|
||||
void post;
|
||||
}, [post?.id]);
|
||||
|
||||
// 投票处理函数
|
||||
|
||||
Reference in New Issue
Block a user