From 1323ebb21743feebe8bb785df9e4dc520609d089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AC=94=E8=AE=B0=E6=9C=AC=E9=87=8C=E7=9A=84=E6=B0=B8?= =?UTF-8?q?=E5=B9=B3?= Date: Wed, 23 Jul 2025 19:05:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9C=AC=E6=AC=A1=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=86=85=E5=AE=B9=E5=A6=82=E4=B8=8B=20?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E7=82=B9=E8=B5=9E=E5=8A=9F=E8=83=BD=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/FriendSelection/index.tsx | 15 ++++++++++--- .../pages/workspace/auto-like/list/index.tsx | 21 ++++++------------- nkebao/src/router/module/workspace.tsx | 2 +- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/nkebao/src/components/FriendSelection/index.tsx b/nkebao/src/components/FriendSelection/index.tsx index 0cf9e06f..8048e8b6 100644 --- a/nkebao/src/components/FriendSelection/index.tsx +++ b/nkebao/src/components/FriendSelection/index.tsx @@ -150,9 +150,18 @@ export default function FriendSelection({ }; // 获取已选好友详细信息 - const selectedFriendObjs = friends.filter((friend) => - selectedFriends.includes(friend.id) - ); + const selectedFriendObjs = [ + ...friends.filter((friend) => selectedFriends.includes(friend.id)), + ...selectedFriends + .filter((id) => !friends.some((friend) => friend.id === id)) + .map((id) => ({ + id, + nickname: id, + wechatId: id, + avatar: "", + customer: "", + })), + ]; // 删除已选好友 const handleRemoveFriend = (id: string) => { diff --git a/nkebao/src/pages/workspace/auto-like/list/index.tsx b/nkebao/src/pages/workspace/auto-like/list/index.tsx index e70fc26a..d9598828 100644 --- a/nkebao/src/pages/workspace/auto-like/list/index.tsx +++ b/nkebao/src/pages/workspace/auto-like/list/index.tsx @@ -1,6 +1,7 @@ import React, { useState, useEffect, useRef } from "react"; import { useNavigate } from "react-router-dom"; -import { NavBar, Button, Toast, SpinLoading, Dialog, Card } from "antd-mobile"; +import { Button, Toast, SpinLoading, Dialog, Card } from "antd-mobile"; +import NavCommon from "@/components/NavCommon"; import { Input } from "antd"; import { PlusOutlined, @@ -230,25 +231,15 @@ const AutoLike: React.FC = () => { - - navigate(-1)} - /> - - } + navigate("/workspace")} right={ } - > - 自动点赞 - + /> {/* 搜索栏 */}
diff --git a/nkebao/src/router/module/workspace.tsx b/nkebao/src/router/module/workspace.tsx index 85282d91..ee4ca0c5 100644 --- a/nkebao/src/router/module/workspace.tsx +++ b/nkebao/src/router/module/workspace.tsx @@ -40,7 +40,7 @@ const workspaceRoutes = [ auth: true, }, { - path: "/workspace/auto-like/:id/edit", + path: "/workspace/auto-like/edit/:id", element: , auth: true, },