This commit is contained in:
2025-10-01 11:13:26 +08:00
parent 9cb2ef0b6f
commit 6d416618f7
9 changed files with 116 additions and 25 deletions

View File

@@ -1,7 +1,7 @@
import React, { useState } from 'react';
import { View, Text, Image } from '@tarojs/components';
import Taro from '@tarojs/taro';
import { FollowUser } from '@/services/followService';
import { FollowService, FollowUser } from '@/services/followService';
import './index.scss';
@@ -52,16 +52,17 @@ const FollowUserCard: React.FC<FollowUserCardProps> = ({ user, tabKey, onFollowC
};
// 加入黑名单
const add_to_blacklist = () => {
const add_to_blacklist = async () => {
if (isProcessing) return;
try {
setIsProcessing(true);
// TODO: 加入黑名单逻辑
Taro.showToast({
title: '不会再为您推荐该用户',
icon: 'none'
});
const res = await FollowService.block_recommend_user(user.id);
if (res) {
Taro.showToast({
title: '不会再为您推荐该用户',
icon: 'none'
});
}
} catch (error) {
console.error('删除推荐人员失败:', error);
Taro.showToast({