修该关注页

This commit is contained in:
张成
2025-09-18 00:19:59 +08:00
parent 33ebba64a9
commit 2f5bfc537c
6 changed files with 69 additions and 55 deletions

View File

@@ -97,10 +97,8 @@ const FollowPage: React.FC = () => {
set_active_tab(tab);
// 如果该标签页还没有数据,则加载
if (user_lists[tab].length === 0) {
load_user_list(tab, true);
}
// 每次切换tab都重新加载数据
load_user_list(tab, true);
};
// 处理关注状态变化
@@ -108,16 +106,16 @@ const FollowPage: React.FC = () => {
try {
if (is_following) {
await FollowService.follow_user(user_id);
Taro.showToast({
title: '关注成功',
icon: 'success'
});
// Taro.showToast({
// title: '关注成功',
// icon: 'success'
// });
} else {
await FollowService.unfollow_user(user_id);
Taro.showToast({
title: '取消关注成功',
icon: 'success'
});
// Taro.showToast({
// title: '取消关注成功',
// icon: 'success'
// });
}
// 更新用户列表中的关注状态