From 28059d7e2b359c26b7a8e008e77123fb9ef78796 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: Tue, 22 Jul 2025 12:07:59 +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?=E6=A0=B7=E5=BC=8F=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nkebao/src/pages/home/index.module.scss | 4 +- .../pages/workspace/auto-group/form/index.tsx | 26 +++--- .../auto-group/list/index.module.scss | 32 +------- .../pages/workspace/auto-group/list/index.tsx | 80 ++++++++++++------- .../auto-like/list/index.module.scss | 61 -------------- .../pages/workspace/auto-like/list/index.tsx | 19 +---- .../pages/workspace/auto-like/new/index.tsx | 65 ++++++++------- .../workspace/moments-sync/MomentsSync.tsx | 70 +++++++++------- .../workspace/moments-sync/index.module.scss | 27 +------ nkebao/src/styles/global.scss | 35 ++++++++ 10 files changed, 189 insertions(+), 230 deletions(-) diff --git a/nkebao/src/pages/home/index.module.scss b/nkebao/src/pages/home/index.module.scss index bd72ec6a..5ddda9a0 100644 --- a/nkebao/src/pages/home/index.module.scss +++ b/nkebao/src/pages/home/index.module.scss @@ -79,8 +79,8 @@ } .stat-label { - font-size: 16px; - color: #666; + font-size: 14px; + color: #333; line-height: 1.2; font-weight: bold; } diff --git a/nkebao/src/pages/workspace/auto-group/form/index.tsx b/nkebao/src/pages/workspace/auto-group/form/index.tsx index dfb5a27e..fd00746f 100644 --- a/nkebao/src/pages/workspace/auto-group/form/index.tsx +++ b/nkebao/src/pages/workspace/auto-group/form/index.tsx @@ -8,10 +8,10 @@ import { Switch, Selector, TextArea, + NavBar, } from "antd-mobile"; -import { LeftOutline } from "antd-mobile-icons"; +import { ArrowLeftOutlined } from "@ant-design/icons"; import Layout from "@/components/Layout/Layout"; -import MeauMobile from "@/components/MeauMobile/MeauMoible"; import style from "./index.module.scss"; import { createAutoGroup, updateAutoGroup } from "./api"; @@ -82,14 +82,22 @@ const AutoGroupForm: React.FC = () => { return ( - -
+ + navigate(-1)} + /> +
+ } + > + {isEdit ? "编辑建群任务" : "新建建群任务"} - - + + } >
diff --git a/nkebao/src/pages/workspace/auto-group/list/index.module.scss b/nkebao/src/pages/workspace/auto-group/list/index.module.scss index dc17e655..d4da9d4b 100644 --- a/nkebao/src/pages/workspace/auto-group/list/index.module.scss +++ b/nkebao/src/pages/workspace/auto-group/list/index.module.scss @@ -1,38 +1,8 @@ .autoGroupList { - padding: 16px 0 80px 0; - background: #f7f8fa; - min-height: 100vh; -} - -.headerBar { - display: flex; - align-items: center; - justify-content: space-between; - padding: 0 16px; - height: 48px; - background: #fff; - border-bottom: 1px solid #f0f0f0; - font-size: 18px; - font-weight: 600; -} - -.title { - font-size: 18px; - font-weight: 600; - color: #222; -} - -.searchBar { - display: flex; - align-items: center; - padding: 12px 16px 0 16px; - background: #fff; - gap: 8px; + padding: 0 12px; } .taskList { - margin-top: 16px; - padding: 0 8px; } .taskCard { diff --git a/nkebao/src/pages/workspace/auto-group/list/index.tsx b/nkebao/src/pages/workspace/auto-group/list/index.tsx index e40135b4..8b607a79 100644 --- a/nkebao/src/pages/workspace/auto-group/list/index.tsx +++ b/nkebao/src/pages/workspace/auto-group/list/index.tsx @@ -3,27 +3,31 @@ import { useNavigate } from "react-router-dom"; import { Button, Card, - Input, Switch, ProgressBar, Popover, Toast, + NavBar, } from "antd-mobile"; +import { Input } from "antd"; import { MoreOutline, AddCircleOutline, - SearchOutline, - FilterOutline, UserAddOutline, ClockCircleOutline, TeamOutline, CalendarOutline, } from "antd-mobile-icons"; -import { ReloadOutlined, SettingOutlined } from "@ant-design/icons"; +import { + ReloadOutlined, + SettingOutlined, + PlusOutlined, + ArrowLeftOutlined, + SearchOutlined, +} from "@ant-design/icons"; import Layout from "@/components/Layout/Layout"; -import MeauMobile from "@/components/MeauMobile/MeauMoible"; import style from "./index.module.scss"; interface GroupTask { @@ -175,35 +179,51 @@ const AutoGroupList: React.FC = () => { return ( -
自动建群
-
+ } + right={ + + } > - 新建任务 - - + 自动建群 + + {/* 搜索栏 */} +
+
+ setSearchTerm(e.target.value)} + prefix={} + allowClear + size="large" + /> +
+ +
+ } - footer={} >
-
- setSearchTerm(val)} - clearable - /> - - -
{filteredTasks.length === 0 ? ( diff --git a/nkebao/src/pages/workspace/auto-like/list/index.module.scss b/nkebao/src/pages/workspace/auto-like/list/index.module.scss index d70e7a45..40ba90bb 100644 --- a/nkebao/src/pages/workspace/auto-like/list/index.module.scss +++ b/nkebao/src/pages/workspace/auto-like/list/index.module.scss @@ -1,64 +1,3 @@ -.header { - background: white; - border-bottom: 1px solid #e5e5e5; - position: sticky; - top: 0; - z-index: 10; -} - -.header-content { - display: flex; - align-items: center; - justify-content: space-between; - padding: 16px; -} - -.header-left { - display: flex; - align-items: center; - gap: 12px; -} - -.header-title { - font-size: 18px; - font-weight: 600; - color: #333; -} - -.search-bar { - display: flex; - gap: 12px; - align-items: center; - padding: 16px; -} - -.search-input-wrapper { - position: relative; - flex: 1; - - .ant-input { - border-radius: 8px; - height: 40px; - } -} -.refresh-btn { - height: 40px; - width: 40px; - padding: 0; - border-radius: 8px; -} - -.new-task-btn { - height: 32px; - padding: 0 12px; - border-radius: 6px; - font-size: 14px; - display: flex; - align-items: center; - gap: 6px; -} - - .task-list { padding: 0 16px; display: flex; diff --git a/nkebao/src/pages/workspace/auto-like/list/index.tsx b/nkebao/src/pages/workspace/auto-like/list/index.tsx index 59b50047..b3244fab 100644 --- a/nkebao/src/pages/workspace/auto-like/list/index.tsx +++ b/nkebao/src/pages/workspace/auto-like/list/index.tsx @@ -1,28 +1,17 @@ import React, { useState, useEffect, useRef } from "react"; import { useNavigate } from "react-router-dom"; -import { - NavBar, - Button, - Toast, - SpinLoading, - Dialog, - Popup, - Card, - Tag, -} from "antd-mobile"; +import { NavBar, Button, Toast, SpinLoading, Dialog, Card } from "antd-mobile"; import { Input } from "antd"; import { PlusOutlined, CopyOutlined, DeleteOutlined, - SettingOutlined, SearchOutlined, ReloadOutlined, EyeOutlined, EditOutlined, MoreOutlined, LikeOutlined, - ClockCircleOutlined, } from "@ant-design/icons"; import { ArrowLeftOutlined } from "@ant-design/icons"; @@ -262,8 +251,8 @@ const AutoLike: React.FC = () => { {/* 搜索栏 */} -
-
+
+
{ size="small" onClick={fetchTasks} loading={loading} - className={style["refresh-btn"]} + className="refresh-btn" > diff --git a/nkebao/src/pages/workspace/auto-like/new/index.tsx b/nkebao/src/pages/workspace/auto-like/new/index.tsx index 24fa60e1..b0a13181 100644 --- a/nkebao/src/pages/workspace/auto-like/new/index.tsx +++ b/nkebao/src/pages/workspace/auto-like/new/index.tsx @@ -6,6 +6,8 @@ import { ArrowLeftOutlined, } from "@ant-design/icons"; import { Button, Input, Switch, message, Spin } from "antd"; +import { NavBar } from "antd-mobile"; +import Layout from "@/components/Layout/Layout"; import { createAutoLikeTask, updateAutoLikeTask, @@ -120,21 +122,6 @@ const NewAutoLike: React.FC = () => { } }; - // 顶部导航栏 - const renderNavBar = () => ( -
-
- ); - // 步骤1:基础设置 const renderBasicSettings = () => (
@@ -314,23 +301,43 @@ const NewAutoLike: React.FC = () => { ); return ( -
- {renderNavBar()} -
- {/* 步骤器保留新项目的 */} - {/* 你可以在这里插入新项目的步骤器组件 */} -
- {currentStep === 1 && renderBasicSettings()} - {currentStep === 2 && renderDeviceSelection()} - {currentStep === 3 && renderFriendSettings()} - {isLoading && ( -
- + + navigate(-1)} + />
- )} + } + > + + {isEditMode ? "编辑自动点赞" : "新建自动点赞"} + + + } + > +
+
+ {/* 步骤器保留新项目的 */} + {/* 你可以在这里插入新项目的步骤器组件 */} +
+ {currentStep === 1 && renderBasicSettings()} + {currentStep === 2 && renderDeviceSelection()} + {currentStep === 3 && renderFriendSettings()} + {isLoading && ( +
+ +
+ )} +
-
+ ); }; diff --git a/nkebao/src/pages/workspace/moments-sync/MomentsSync.tsx b/nkebao/src/pages/workspace/moments-sync/MomentsSync.tsx index ed9c899e..c7d1fb1f 100644 --- a/nkebao/src/pages/workspace/moments-sync/MomentsSync.tsx +++ b/nkebao/src/pages/workspace/moments-sync/MomentsSync.tsx @@ -1,6 +1,7 @@ import React, { useEffect, useState } from "react"; import { useNavigate } from "react-router-dom"; -import { Button, Switch, Input, message, Badge, Dropdown, Menu } from "antd"; +import { Switch, Input, message, Dropdown, Menu } from "antd"; +import { NavBar, Button } from "antd-mobile"; import { PlusOutlined, SearchOutlined, @@ -148,37 +149,48 @@ const MomentsSync: React.FC = () => { -
+ + navigate("/workspace")} + /> +
+ } + right={ + + } + > + 朋友圈同步 + +
+
+ setSearchTerm(e.target.value)} + prefix={} + allowClear + size="large" + /> +
-
-
- } - value={searchTerm} - onChange={(e) => setSearchTerm(e.target.value)} - onPressEnter={fetchTasks} - className={style.searchInput} - /> -
} diff --git a/nkebao/src/pages/workspace/moments-sync/index.module.scss b/nkebao/src/pages/workspace/moments-sync/index.module.scss index a1993498..619dc663 100644 --- a/nkebao/src/pages/workspace/moments-sync/index.module.scss +++ b/nkebao/src/pages/workspace/moments-sync/index.module.scss @@ -1,17 +1,8 @@ .pageBg { - background: #f8f6f3; - padding-bottom: 24px; + } -.headerBar { - display: flex; - align-items: center; - justify-content: space-between; - background: #fff; - border-bottom: 1px solid #f0f0f0; - padding: 0 16px; - height: 56px; -} + .title { font-size: 18px; @@ -32,21 +23,9 @@ margin-left: 8px; } -.searchBar { - display: flex; - align-items: center; - gap: 8px; - padding: 16px 16px 0 16px; - background: #f8f6f3; -} - -.searchInput { - flex: 1; - min-width: 0; -} .taskList { - padding: 16px; + padding:0 16px; } .taskCard { diff --git a/nkebao/src/styles/global.scss b/nkebao/src/styles/global.scss index 5348f05b..c3838c08 100644 --- a/nkebao/src/styles/global.scss +++ b/nkebao/src/styles/global.scss @@ -123,9 +123,44 @@ input, textarea { body, input, textarea, select, button { touch-action: manipulation; } + // 导航栏样式 .nav-title { font-size: 18px; font-weight: 600; color: var(--primary-color); } + +// 搜索相关样式 +.search-bar { + display: flex; + gap: 12px; + align-items: center; + padding: 12px; +} + +.search-input-wrapper { + position: relative; + flex: 1; + + .ant-input { + border-radius: 8px; + } +} + +.refresh-btn { + height: 40px; + width: 40px; + padding: 0; + border-radius: 8px; +} + +.new-task-btn { + height: 32px; + padding: 0 12px; + border-radius: 6px; + font-size: 14px; + display: flex; + align-items: center; + gap: 6px; +}