From 60af57317d2e4cd737e2f298f0594aef8127a63b 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: Mon, 21 Jul 2025 17:58:09 +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?=E7=BE=A4=E6=B6=88=E6=81=AF=E6=8E=A8=E9=80=81=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E6=A0=8F=E6=9E=84=E5=BB=BA=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/components/StepIndicator.tsx | 27 +++++++-- .../workspace/group-push/form/index.data.ts | 32 +++++++++++ .../pages/workspace/group-push/form/index.tsx | 55 ++++--------------- .../group-push/list/index.module.scss | 6 +- .../pages/workspace/group-push/list/index.tsx | 25 ++++++++- 5 files changed, 93 insertions(+), 52 deletions(-) create mode 100644 nkebao/src/pages/workspace/group-push/form/index.data.ts diff --git a/nkebao/src/pages/workspace/group-push/form/components/StepIndicator.tsx b/nkebao/src/pages/workspace/group-push/form/components/StepIndicator.tsx index dc293d2e..5702c77f 100644 --- a/nkebao/src/pages/workspace/group-push/form/components/StepIndicator.tsx +++ b/nkebao/src/pages/workspace/group-push/form/components/StepIndicator.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { Steps } from "antd"; +import { Steps } from "antd-mobile"; interface StepIndicatorProps { currentStep: number; @@ -11,10 +11,29 @@ const StepIndicator: React.FC = ({ steps, }) => { return ( -
+
- {steps.map((step) => ( - + {steps.map((step, idx) => ( + + {step.id} +
+ } + /> ))}
diff --git a/nkebao/src/pages/workspace/group-push/form/index.data.ts b/nkebao/src/pages/workspace/group-push/form/index.data.ts new file mode 100644 index 00000000..fd965045 --- /dev/null +++ b/nkebao/src/pages/workspace/group-push/form/index.data.ts @@ -0,0 +1,32 @@ +export interface WechatGroup { + id: string; + name: string; + avatar: string; + serviceAccount: { + id: string; + name: string; + avatar: string; + }; +} + +export interface ContentLibrary { + id: string; + name: string; + targets: Array<{ + id: string; + avatar: string; + }>; +} + +export interface FormData { + name: string; + pushTimeStart: string; + pushTimeEnd: string; + dailyPushCount: number; + pushOrder: "earliest" | "latest"; + isLoopPush: boolean; + isImmediatePush: boolean; + isEnabled: boolean; + groups: WechatGroup[]; + contentLibraries: ContentLibrary[]; +} diff --git a/nkebao/src/pages/workspace/group-push/form/index.tsx b/nkebao/src/pages/workspace/group-push/form/index.tsx index 4728be4f..e6b4be35 100644 --- a/nkebao/src/pages/workspace/group-push/form/index.tsx +++ b/nkebao/src/pages/workspace/group-push/form/index.tsx @@ -1,6 +1,8 @@ import React, { useState } from "react"; import { useNavigate } from "react-router-dom"; -import { Button } from "antd"; +import { Button } from "antd-mobile"; +import { NavBar } from "antd-mobile"; +import { LeftOutline } from "antd-mobile-icons"; import { createGroupPushTask } from "@/api/groupPush"; import Layout from "@/components/Layout/Layout"; import MeauMobile from "@/components/MeauMobile/MeauMoible"; @@ -8,39 +10,7 @@ import StepIndicator from "./components/StepIndicator"; import BasicSettings from "./components/BasicSettings"; import GroupSelector from "./components/GroupSelector"; import ContentSelector from "./components/ContentSelector"; - -interface WechatGroup { - id: string; - name: string; - avatar: string; - serviceAccount: { - id: string; - name: string; - avatar: string; - }; -} - -interface ContentLibrary { - id: string; - name: string; - targets: Array<{ - id: string; - avatar: string; - }>; -} - -interface FormData { - name: string; - pushTimeStart: string; - pushTimeEnd: string; - dailyPushCount: number; - pushOrder: "earliest" | "latest"; - isLoopPush: boolean; - isImmediatePush: boolean; - isEnabled: boolean; - groups: WechatGroup[]; - contentLibraries: ContentLibrary[]; -} +import type { WechatGroup, ContentLibrary, FormData } from "./index.data"; const steps = [ { id: 1, title: "步骤 1", subtitle: "基础设置" }, @@ -136,16 +106,13 @@ const NewGroupPush: React.FC = () => { return ( navigate(-1)} + style={{ background: "#fff" }} + right={null} > - 新建社群推送任务 - + 群消息推送 + } footer={} > @@ -206,7 +173,7 @@ const NewGroupPush: React.FC = () => { - + } + > } footer={} >