diff --git a/nkebao/src/App.tsx b/nkebao/src/App.tsx
index 707bcaaff..80c21ccec 100644
--- a/nkebao/src/App.tsx
+++ b/nkebao/src/App.tsx
@@ -1,5 +1,6 @@
import React from 'react';
import { BrowserRouter, Routes, Route } from 'react-router-dom';
+import LayoutWrapper from './components/LayoutWrapper';
import Home from './pages/Home';
import Login from './pages/login/Login';
import Devices from './pages/devices/Devices';
@@ -23,28 +24,30 @@ import Content from './pages/content/Content';
function App() {
return (
-
- } />
- } />
- } />
- } />
- } />
- } />
- } />
- } />
- } />
- } />
- } />
- } />
- } />
- } />
- } />
- } />
- } />
- } />
- } />
- {/* 你可以继续添加更多路由 */}
-
+
+
+ } />
+ } />
+ } />
+ } />
+ } />
+ } />
+ } />
+ } />
+ } />
+ } />
+ } />
+ } />
+ } />
+ } />
+ } />
+ } />
+ } />
+ } />
+ } />
+ {/* 你可以继续添加更多路由 */}
+
+
);
}
diff --git a/nkebao/src/components/BottomNav.tsx b/nkebao/src/components/BottomNav.tsx
new file mode 100644
index 000000000..b7813f792
--- /dev/null
+++ b/nkebao/src/components/BottomNav.tsx
@@ -0,0 +1,38 @@
+import React from 'react';
+import { Link, useLocation } from 'react-router-dom';
+import { Home, Users, User, Briefcase } from 'lucide-react';
+
+const navItems = [
+ { href: "/", icon: Home, label: "首页" },
+ { href: "/scenarios", icon: Users, label: "场景获客" },
+ { href: "/workspace", icon: Briefcase, label: "工作台" },
+ { href: "/profile", icon: User, label: "我的" },
+];
+
+export default function BottomNav() {
+ const location = useLocation();
+
+ return (
+
+ );
+}
\ No newline at end of file
diff --git a/nkebao/src/components/LayoutWrapper.tsx b/nkebao/src/components/LayoutWrapper.tsx
new file mode 100644
index 000000000..c17462eb9
--- /dev/null
+++ b/nkebao/src/components/LayoutWrapper.tsx
@@ -0,0 +1,24 @@
+import React from 'react';
+import { useLocation } from 'react-router-dom';
+import BottomNav from './BottomNav';
+
+interface LayoutWrapperProps {
+ children: React.ReactNode;
+}
+
+export default function LayoutWrapper({ children }: LayoutWrapperProps) {
+ const location = useLocation();
+
+ // 只在四个主页显示底部导航栏:首页、场景获客、工作台和我的
+ const mainPages = ["/", "/scenarios", "/workspace", "/profile"];
+ const showBottomNav = mainPages.includes(location.pathname);
+
+ return (
+
+
+ {children}
+ {showBottomNav && }
+
+
+ );
+}
\ No newline at end of file
diff --git a/nkebao/src/pages/Home.tsx b/nkebao/src/pages/Home.tsx
index f4e7ccad8..f29946de0 100644
--- a/nkebao/src/pages/Home.tsx
+++ b/nkebao/src/pages/Home.tsx
@@ -147,7 +147,7 @@ export default function Home() {
};
return (
-