diff --git a/nkebao/src/components/MeauMobile/MeauMoible.tsx b/nkebao/src/components/MeauMobile/MeauMoible.tsx index 2a84a9dc..36b758c6 100644 --- a/nkebao/src/components/MeauMobile/MeauMoible.tsx +++ b/nkebao/src/components/MeauMobile/MeauMoible.tsx @@ -1,8 +1,8 @@ -import React, { useState, useEffect } from "react"; +import React from "react"; import { TabBar } from "antd-mobile"; import { PieOutline, UserOutline } from "antd-mobile-icons"; import { HomeOutlined, TeamOutlined } from "@ant-design/icons"; -import { useLocation, useNavigate } from "react-router-dom"; +import { useNavigate } from "react-router-dom"; const tabs = [ { @@ -12,13 +12,13 @@ const tabs = [ path: "/", }, { - key: "scene", + key: "scenarios", title: "场景获客", icon: , path: "/scenarios", }, { - key: "work", + key: "workspace", title: "工作台", icon: , path: "/workspace", @@ -31,38 +31,18 @@ const tabs = [ }, ]; -// 需要展示菜单的路由白名单(可根据实际业务调整) -const menuPaths = ["/", "/scenarios", "/workspace", "/mine"]; +interface MeauMobileProps { + activeKey: string; +} -const MeauMobile: React.FC = () => { - const location = useLocation(); +const MeauMobile: React.FC = ({ activeKey }) => { const navigate = useNavigate(); - const [activeKey, setActiveKey] = useState("home"); - - // 根据当前路由自动设置 activeKey,支持嵌套路由 - useEffect(() => { - const found = tabs.find((tab) => - tab.path === "/" - ? location.pathname === "/" - : location.pathname.startsWith(tab.path) - ); - if (found) setActiveKey(found.key); - }, [location.pathname]); - - // 判断当前路由是否需要展示菜单 - const showMenu = menuPaths.some((path) => - path === "/" - ? location.pathname === "/" - : location.pathname.startsWith(path) - ); - if (!showMenu) return null; return ( { - setActiveKey(key); const tab = tabs.find((t) => t.key === key); if (tab && tab.path) navigate(tab.path); }} diff --git a/nkebao/src/pages/mine/index.tsx b/nkebao/src/pages/mine/index.tsx index 9cdc3a28..12d1e55c 100644 --- a/nkebao/src/pages/mine/index.tsx +++ b/nkebao/src/pages/mine/index.tsx @@ -82,7 +82,7 @@ const Mine: React.FC = () => { } - footer={} + footer={} >
{/* 用户信息卡片 */} diff --git a/nkebao/src/pages/scenarios/Scenarios.tsx b/nkebao/src/pages/scenarios/Scenarios.tsx deleted file mode 100644 index 48d33760..00000000 --- a/nkebao/src/pages/scenarios/Scenarios.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import React from "react"; -import PlaceholderPage from "@/components/PlaceholderPage"; - -const Scenarios: React.FC = () => { - return ( - - ); -}; - -export default Scenarios; diff --git a/nkebao/src/pages/scenarios/list/index.tsx b/nkebao/src/pages/scenarios/list/index.tsx index fe28da46..24ddffe8 100644 --- a/nkebao/src/pages/scenarios/list/index.tsx +++ b/nkebao/src/pages/scenarios/list/index.tsx @@ -83,17 +83,11 @@ const Scene: React.FC = () => { header={
场景获客
-
} - footer={} >
{error}
@@ -125,6 +119,7 @@ const Scene: React.FC = () => { } > } + footer={} >
diff --git a/nkebao/src/pages/scenarios/plan/list/index.tsx b/nkebao/src/pages/scenarios/plan/list/index.tsx index a2cd331d..7a62a842 100644 --- a/nkebao/src/pages/scenarios/plan/list/index.tsx +++ b/nkebao/src/pages/scenarios/plan/list/index.tsx @@ -24,7 +24,7 @@ import { ClockCircleOutlined, DownOutlined, } from "@ant-design/icons"; -import { LeftOutline } from "antd-mobile-icons"; +import { ArrowLeftOutlined } from "@ant-design/icons"; import Layout from "@/components/Layout/Layout"; import { @@ -357,10 +357,10 @@ const ScenarioList: React.FC = () => { style={{ background: "#fff" }} left={
- - navigate(-1)} fontSize={24} /> - - {scenarioName} + navigate(-1)} + />
} right={ @@ -368,12 +368,13 @@ const ScenarioList: React.FC = () => { size="small" color="primary" onClick={handleCreateNewPlan} - className="new-plan-btn" > 新建计划 } - /> + > + {scenarioName} + {/* 搜索栏 */}
diff --git a/nkebao/src/pages/scenarios/plan/new/index.tsx b/nkebao/src/pages/scenarios/plan/new/index.tsx index 4d3e1497..5d166527 100644 --- a/nkebao/src/pages/scenarios/plan/new/index.tsx +++ b/nkebao/src/pages/scenarios/plan/new/index.tsx @@ -1,9 +1,9 @@ import React, { useState, useEffect } from "react"; import { useNavigate, useParams } from "react-router-dom"; import { NavBar, Button, Toast, SpinLoading, Steps, Popup } 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 BasicSettings from "./steps/BasicSettings"; import FriendRequestSettings from "./steps/FriendRequestSettings"; import MessageSettings from "./steps/MessageSettings"; @@ -235,7 +235,6 @@ const NewPlan: React.FC = () => {
} - footer={} >
@@ -254,13 +253,17 @@ const NewPlan: React.FC = () => { style={{ background: "#fff" }} left={
- - navigate(-1)} fontSize={24} /> - - {isEdit ? "编辑计划" : "新建计划"} + navigate(-1)} + />
} - /> + > + + {isEdit ? "编辑计划" : "新建计划"} + + {/* 步骤指示器 */}
diff --git a/nkebao/src/pages/workspace/auto-like/list/index.tsx b/nkebao/src/pages/workspace/auto-like/list/index.tsx index 7e5f78e9..59b50047 100644 --- a/nkebao/src/pages/workspace/auto-like/list/index.tsx +++ b/nkebao/src/pages/workspace/auto-like/list/index.tsx @@ -24,10 +24,9 @@ import { LikeOutlined, ClockCircleOutlined, } from "@ant-design/icons"; -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 { fetchAutoLikeTasks, deleteAutoLikeTask, @@ -243,20 +242,25 @@ const AutoLike: React.FC = () => { header={ <> window.history.back()} left={ -
- 自动点赞 +
+ navigate(-1)} + />
} right={ } - /> + > + 自动点赞 + + {/* 搜索栏 */}
diff --git a/nkebao/src/pages/workspace/main/index.tsx b/nkebao/src/pages/workspace/main/index.tsx index 56c2c729..20cdc64f 100644 --- a/nkebao/src/pages/workspace/main/index.tsx +++ b/nkebao/src/pages/workspace/main/index.tsx @@ -140,7 +140,7 @@ const Workspace: React.FC = () => {
} - footer={} + footer={} >
{/* 常用功能 */}