feat: 本次提交更新内容如下
自动点赞功能完成
This commit is contained in:
@@ -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) => {
|
||||
|
||||
@@ -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 = () => {
|
||||
<Layout
|
||||
header={
|
||||
<>
|
||||
<NavBar
|
||||
back={null}
|
||||
style={{ background: "#fff" }}
|
||||
left={
|
||||
<div className="nav-title">
|
||||
<ArrowLeftOutlined
|
||||
twoToneColor="#1677ff"
|
||||
onClick={() => navigate(-1)}
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
<NavCommon
|
||||
title="自动点赞"
|
||||
backFn={() => navigate("/workspace")}
|
||||
right={
|
||||
<Button size="small" color="primary" onClick={handleCreateNew}>
|
||||
<PlusOutlined /> 新建计划
|
||||
</Button>
|
||||
}
|
||||
>
|
||||
<span className="nav-title">自动点赞</span>
|
||||
</NavBar>
|
||||
/>
|
||||
|
||||
{/* 搜索栏 */}
|
||||
<div className="search-bar">
|
||||
|
||||
@@ -40,7 +40,7 @@ const workspaceRoutes = [
|
||||
auth: true,
|
||||
},
|
||||
{
|
||||
path: "/workspace/auto-like/:id/edit",
|
||||
path: "/workspace/auto-like/edit/:id",
|
||||
element: <NewAutoLike />,
|
||||
auth: true,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user