样式优化

This commit is contained in:
2025-09-18 23:38:20 +08:00
parent b499a57f1f
commit 3915a8cd46
6 changed files with 102 additions and 23 deletions

View File

@@ -55,9 +55,9 @@
display: flex;
justify-content: center;
align-items: center;
padding: 4px 16px;
padding: 6px 16px;
border-radius: 20px;
min-width: 60px;
white-space: nowrap;
.button_text {
font-family: PingFang SC;
@@ -98,4 +98,28 @@
pointer-events: none;
}
}
.delete_button {
width: 20px;
height: 20px;
margin-left: 4px;
display: flex;
justify-content: center;
align-items: center;
&::before, &::after {
content: "";
display: block;
width: 13px;
height: 2px;
border-radius: 2px;
background: #8c8c8c;
position: absolute;
}
&::before {
transform: rotate(45deg);
}
&::after {
transform: rotate(-45deg);
}
}
}

View File

@@ -46,6 +46,28 @@ const FollowUserCard: React.FC<FollowUserCardProps> = ({ user, onFollowChange })
}
};
// 加入黑名单
const add_to_blacklist = () => {
if (isProcessing) return;
try {
setIsProcessing(true);
// TODO: 加入黑名单逻辑
Taro.showToast({
title: '不会再为您推荐该用户',
icon: 'none'
});
} catch (error) {
console.error('删除推荐人员失败:', error);
Taro.showToast({
title: '操作失败',
icon: 'none'
});
} finally {
setIsProcessing(false);
}
};
// 处理用户点击
const handle_user_click = () => {
Taro.navigateTo({
@@ -59,7 +81,7 @@ const FollowUserCard: React.FC<FollowUserCardProps> = ({ user, onFollowChange })
case 'follower':
case 'recommend':
return {
text: '关',
text: '关',
className: 'follow_button'
};
case 'following':
@@ -105,6 +127,11 @@ const FollowUserCard: React.FC<FollowUserCardProps> = ({ user, onFollowChange })
{isProcessing ? '处理中...' : button_config.text}
</Text>
</View>
{
user.follow_status === 'recommend' && (
<View className='delete_button' onClick={add_to_blacklist}></View>
)
}
</View>
);
};