feat: 本次提交更新内容如下
自动点赞新建功能完成
This commit is contained in:
@@ -108,7 +108,7 @@ export default function FriendSelection({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (enableDeviceFilter && deviceIds.length > 0) {
|
if (enableDeviceFilter && deviceIds.length > 0) {
|
||||||
params.deviceIds = deviceIds;
|
params.deviceIds = deviceIds.join(",");
|
||||||
}
|
}
|
||||||
|
|
||||||
const response = await getFriendList(params);
|
const response = await getFriendList(params);
|
||||||
|
|||||||
@@ -1,15 +1,12 @@
|
|||||||
import React, { useState, useEffect } from "react";
|
import React, { useState, useEffect } from "react";
|
||||||
import { useNavigate, useParams } from "react-router-dom";
|
import { useNavigate, useParams } from "react-router-dom";
|
||||||
import {
|
import { PlusOutlined, MinusOutlined } from "@ant-design/icons";
|
||||||
PlusOutlined,
|
|
||||||
MinusOutlined,
|
|
||||||
ArrowLeftOutlined,
|
|
||||||
} from "@ant-design/icons";
|
|
||||||
import { Button, Input, Switch, Spin, message } from "antd";
|
import { Button, Input, Switch, Spin, message } from "antd";
|
||||||
import Layout from "@/components/Layout/Layout";
|
import Layout from "@/components/Layout/Layout";
|
||||||
import DeviceSelection from "@/components/DeviceSelection";
|
import DeviceSelection from "@/components/DeviceSelection";
|
||||||
import FriendSelection from "@/components/FriendSelection";
|
import FriendSelection from "@/components/FriendSelection";
|
||||||
import StepIndicator from "@/components/StepIndicator";
|
import StepIndicator from "@/components/StepIndicator";
|
||||||
|
import NavCommon from "@/components/NavCommon";
|
||||||
import {
|
import {
|
||||||
createAutoLikeTask,
|
createAutoLikeTask,
|
||||||
updateAutoLikeTask,
|
updateAutoLikeTask,
|
||||||
@@ -186,7 +183,6 @@ const NewAutoLike: React.FC = () => {
|
|||||||
}
|
}
|
||||||
className={style.counterInput}
|
className={style.counterInput}
|
||||||
/>
|
/>
|
||||||
<span className={style.counterUnit}>秒</span>
|
|
||||||
</div>
|
</div>
|
||||||
<Button
|
<Button
|
||||||
icon={<PlusOutlined />}
|
icon={<PlusOutlined />}
|
||||||
@@ -195,6 +191,7 @@ const NewAutoLike: React.FC = () => {
|
|||||||
}
|
}
|
||||||
className={style.counterBtn}
|
className={style.counterBtn}
|
||||||
/>
|
/>
|
||||||
|
<span className={style.counterUnit}>秒</span>
|
||||||
</div>
|
</div>
|
||||||
<div className={style.counterTip}>设置两次点赞之间的最小时间间隔</div>
|
<div className={style.counterTip}>设置两次点赞之间的最小时间间隔</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -223,7 +220,6 @@ const NewAutoLike: React.FC = () => {
|
|||||||
}
|
}
|
||||||
className={style.counterInput}
|
className={style.counterInput}
|
||||||
/>
|
/>
|
||||||
<span className={style.counterUnit}>次/天</span>
|
|
||||||
</div>
|
</div>
|
||||||
<Button
|
<Button
|
||||||
icon={<PlusOutlined />}
|
icon={<PlusOutlined />}
|
||||||
@@ -232,6 +228,7 @@ const NewAutoLike: React.FC = () => {
|
|||||||
}
|
}
|
||||||
className={style.counterBtn}
|
className={style.counterBtn}
|
||||||
/>
|
/>
|
||||||
|
<span className={style.counterUnit}>次/天</span>
|
||||||
</div>
|
</div>
|
||||||
<div className={style.counterTip}>设置每天最多点赞的次数</div>
|
<div className={style.counterTip}>设置每天最多点赞的次数</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -335,7 +332,6 @@ const NewAutoLike: React.FC = () => {
|
|||||||
<DeviceSelection
|
<DeviceSelection
|
||||||
selectedDevices={formData.devices}
|
selectedDevices={formData.devices}
|
||||||
onSelect={(devices) => handleUpdateFormData({ devices })}
|
onSelect={(devices) => handleUpdateFormData({ devices })}
|
||||||
mode="dialog"
|
|
||||||
showInput={true}
|
showInput={true}
|
||||||
showSelectedList={true}
|
showSelectedList={true}
|
||||||
/>
|
/>
|
||||||
@@ -365,7 +361,7 @@ const NewAutoLike: React.FC = () => {
|
|||||||
<div className={style.basicSection}>
|
<div className={style.basicSection}>
|
||||||
<div className={style.formItem}>
|
<div className={style.formItem}>
|
||||||
<FriendSelection
|
<FriendSelection
|
||||||
selectedFriends={formData.friends}
|
selectedFriends={formData.friends || []}
|
||||||
onSelect={(friends) => handleUpdateFormData({ friends })}
|
onSelect={(friends) => handleUpdateFormData({ friends })}
|
||||||
deviceIds={formData.devices}
|
deviceIds={formData.devices}
|
||||||
/>
|
/>
|
||||||
@@ -384,7 +380,7 @@ const NewAutoLike: React.FC = () => {
|
|||||||
className={style.completeBtn}
|
className={style.completeBtn}
|
||||||
size="large"
|
size="large"
|
||||||
loading={isSubmitting}
|
loading={isSubmitting}
|
||||||
disabled={formData.friends.length === 0}
|
disabled={!formData.friends || formData.friends.length === 0}
|
||||||
>
|
>
|
||||||
{isEditMode ? "更新任务" : "创建任务"}
|
{isEditMode ? "更新任务" : "创建任务"}
|
||||||
</Button>
|
</Button>
|
||||||
@@ -395,21 +391,10 @@ const NewAutoLike: React.FC = () => {
|
|||||||
<Layout
|
<Layout
|
||||||
header={
|
header={
|
||||||
<>
|
<>
|
||||||
<div className={style.headerBar}>
|
<NavCommon title={isEditMode ? "编辑自动点赞" : "新建自动点赞"} />
|
||||||
<Button
|
|
||||||
type="text"
|
|
||||||
icon={<ArrowLeftOutlined />}
|
|
||||||
onClick={() => navigate(-1)}
|
|
||||||
className={style.backBtn}
|
|
||||||
/>
|
|
||||||
<span className={style.title}>
|
|
||||||
{isEditMode ? "编辑自动点赞" : "新建自动点赞"}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
{renderStepIndicator()}
|
{renderStepIndicator()}
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
footer={<MeauMobile activeKey="workspace" />}
|
|
||||||
>
|
>
|
||||||
<div className={style.formBg}>
|
<div className={style.formBg}>
|
||||||
{isLoading ? (
|
{isLoading ? (
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.inputTime {
|
.inputTime {
|
||||||
width: 90px;
|
width: 100px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
@@ -104,11 +104,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.counterUnit {
|
.counterUnit {
|
||||||
position: absolute;
|
|
||||||
right: 8px;
|
|
||||||
color: #888;
|
color: #888;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
pointer-events: none;
|
margin-left: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.timeSeparator {
|
.timeSeparator {
|
||||||
|
|||||||
Reference in New Issue
Block a user