修该关注页
This commit is contained in:
@@ -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'
|
||||
// });
|
||||
}
|
||||
|
||||
// 更新用户列表中的关注状态
|
||||
|
||||
Reference in New Issue
Block a user