-
- 设备数量
- 0
-
-
- 微信号数量
- 0
-
-
- 在线微信号
- 0
-
+
+
+
+
+ 热门获客场景
+
+
+ 选择适合的获客场景,提升转化效果
+
- {/* 场景获客统计 */}
-
- 场景获客统计
-
- {sceneStats.map((item) => (
-
-
{item.icon}
-
{item.value}
-
{item.label}
-
- ))}
-
-
-
- {/* 今日数据 */}
-
- 今日数据
-
- {todayStats.map((item) => (
-
-
-
{item.value}
-
{item.label}
+
+ {scenarios.map((scenario) => (
+
handleScenarioClick(scenario.id, scenario.name)}
+ >
+
+
+
+

{
+ e.currentTarget.src =
+ "https://hebbkx1anhila5yf.public.blob.vercel-storage.com/image-api.png";
+ }}
+ />
+
+
+
+ {scenario.name}
+
+
+
+ 今日获客: {scenario.count}
+
+
+
-
- ))}
-
-
- {/* 每日获客趋势(静态图表占位) */}
-
- 每日获客趋势
-
-
+
+
+ ))}
+
+
+ {scenarios.length === 0 && !loading && (
+
+
📊
+
暂无场景数据
+
-
+ )}
);
};
-export default Home;
+export default Scene;
diff --git a/nkebao/src/pages/traffic-pool/TrafficPool.tsx b/nkebao/src/pages/traffic-pool/TrafficPool.tsx
new file mode 100644
index 00000000..d64714d2
--- /dev/null
+++ b/nkebao/src/pages/traffic-pool/TrafficPool.tsx
@@ -0,0 +1,10 @@
+import React from "react";
+import PlaceholderPage from "@/components/PlaceholderPage";
+
+const TrafficPool: React.FC = () => {
+ return (
+
+ );
+};
+
+export default TrafficPool;
diff --git a/nkebao/src/pages/traffic-pool/TrafficPoolDetail.tsx b/nkebao/src/pages/traffic-pool/TrafficPoolDetail.tsx
new file mode 100644
index 00000000..d4c1ceef
--- /dev/null
+++ b/nkebao/src/pages/traffic-pool/TrafficPoolDetail.tsx
@@ -0,0 +1,8 @@
+import React from "react";
+import PlaceholderPage from "@/components/PlaceholderPage";
+
+const TrafficPoolDetail: React.FC = () => {
+ return ;
+};
+
+export default TrafficPoolDetail;
diff --git a/nkebao/src/pages/wechat-accounts/WechatAccountDetail.tsx b/nkebao/src/pages/wechat-accounts/WechatAccountDetail.tsx
new file mode 100644
index 00000000..ac5fa6ec
--- /dev/null
+++ b/nkebao/src/pages/wechat-accounts/WechatAccountDetail.tsx
@@ -0,0 +1,30 @@
+import React from "react";
+import { NavBar } from "antd-mobile";
+import Layout from "@/components/Layout/Layout";
+import MeauMobile from "@/components/MeauMobile/MeauMoible";
+
+const WechatAccountDetail: React.FC = () => {
+ return (
+ window.history.back()}
+ >
+
+ 微信号详情
+
+
+ }
+ footer={}
+ >
+
+
微信号详情页面
+
此页面正在开发中...
+
+
+ );
+};
+
+export default WechatAccountDetail;
diff --git a/nkebao/src/pages/wechat-accounts/WechatAccounts.tsx b/nkebao/src/pages/wechat-accounts/WechatAccounts.tsx
new file mode 100644
index 00000000..5354b826
--- /dev/null
+++ b/nkebao/src/pages/wechat-accounts/WechatAccounts.tsx
@@ -0,0 +1,37 @@
+import React from "react";
+import { NavBar, Button } from "antd-mobile";
+import { AddOutline } from "antd-mobile-icons";
+import Layout from "@/components/Layout/Layout";
+import MeauMobile from "@/components/MeauMobile/MeauMoible";
+
+const WechatAccounts: React.FC = () => {
+ return (
+
+ 微信号管理
+
+ }
+ right={
+
+ }
+ />
+ }
+ footer={
}
+ >
+
+
微信号管理页面
+
此页面正在开发中...
+
+
+ );
+};
+
+export default WechatAccounts;
diff --git a/nkebao/src/pages/workspace/Workspace.module.scss b/nkebao/src/pages/workspace/Workspace.module.scss
new file mode 100644
index 00000000..c073ab28
--- /dev/null
+++ b/nkebao/src/pages/workspace/Workspace.module.scss
@@ -0,0 +1,185 @@
+.workspace {
+ padding: 16px;
+ background-color: #f5f5f5;
+ min-height: 100vh;
+}
+
+.statsGrid {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: 12px;
+ margin-bottom: 24px;
+}
+
+.statsCard {
+ background: #fff;
+ border-radius: 12px;
+ padding: 16px;
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
+
+ :global(.adm-card-body) {
+ padding: 0;
+ }
+}
+
+.statsTitle {
+ font-size: 14px;
+ color: #666;
+ margin-bottom: 8px;
+}
+
+.statsValue {
+ font-size: 28px;
+ font-weight: 700;
+ color: var(--primary-color);
+ margin-bottom: 12px;
+}
+
+.progress {
+ margin-bottom: 8px;
+
+ :global(.adm-progress-bar) {
+ background-color: #f0f0f0;
+ }
+
+ :global(.adm-progress-bar-fill) {
+ background-color: var(--primary-color);
+ }
+}
+
+.statsSubtitle {
+ font-size: 12px;
+ color: #999;
+}
+
+.activityRate {
+ display: flex;
+ align-items: center;
+ font-size: 14px;
+ color: #52c41a;
+ margin-top: 8px;
+}
+
+.activityIcon {
+ width: 16px;
+ height: 16px;
+ margin-right: 4px;
+ color: #52c41a;
+}
+
+.section {
+ margin-bottom: 24px;
+}
+
+.sectionTitle {
+ font-size: 18px;
+ font-weight: 600;
+ color: #333;
+ margin-bottom: 16px;
+ padding-left: 4px;
+}
+
+.featuresGrid {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: 12px;
+}
+
+.featureLink {
+ text-decoration: none;
+ color: inherit;
+}
+
+.featureCard {
+ background: #fff;
+ border-radius: 12px;
+ padding: 16px;
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
+ transition: all 0.2s ease;
+
+ &:hover {
+ transform: translateY(-2px);
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
+ }
+
+ :global(.adm-card-body) {
+ padding: 0;
+ }
+}
+
+.featureIcon {
+ width: 40px;
+ height: 40px;
+ border-radius: 8px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-bottom: 12px;
+}
+
+.icon {
+ font-size: 20px;
+}
+
+.featureHeader {
+ display: flex;
+ align-items: center;
+ margin-bottom: 4px;
+}
+
+.featureName {
+ font-size: 16px;
+ font-weight: 600;
+ color: #333;
+}
+
+.newBadge {
+ margin-left: 8px;
+
+ :global(.adm-badge-content) {
+ background-color: var(--primary-color);
+ color: #fff;
+ font-size: 10px;
+ padding: 2px 6px;
+ border-radius: 10px;
+ }
+}
+
+.featureDescription {
+ font-size: 12px;
+ color: #666;
+ line-height: 1.4;
+}
+
+// 响应式设计
+@media (max-width: 375px) {
+ .workspace {
+ padding: 12px;
+ }
+
+ .statsGrid {
+ gap: 8px;
+ }
+
+ .featuresGrid {
+ gap: 8px;
+ }
+
+ .statsCard,
+ .featureCard {
+ padding: 12px;
+ }
+
+ .statsValue {
+ font-size: 24px;
+ }
+
+ .featureIcon {
+ width: 36px;
+ height: 36px;
+ }
+
+ .icon {
+ font-size: 18px;
+ }
+}
\ No newline at end of file
diff --git a/nkebao/src/pages/workspace/Workspace.tsx b/nkebao/src/pages/workspace/Workspace.tsx
new file mode 100644
index 00000000..81096f03
--- /dev/null
+++ b/nkebao/src/pages/workspace/Workspace.tsx
@@ -0,0 +1,254 @@
+import React from "react";
+import { Link } from "react-router-dom";
+import { Card, NavBar, Badge, Progress } from "antd-mobile";
+import {
+ ThumbsUpOutline,
+ MessageOutline,
+ SendOutline,
+ TeamOutline,
+ ShareOutline,
+ AppOutline,
+ BarChartOutline,
+ LineChartOutline,
+ ClockCircleOutline,
+} from "antd-mobile-icons";
+import Layout from "@/components/Layout/Layout";
+import MeauMobile from "@/components/MeauMobile/MeauMoible";
+import styles from "./Workspace.module.scss";
+
+const Workspace: React.FC = () => {
+ // 模拟任务数据
+ const taskStats = {
+ total: 42,
+ inProgress: 12,
+ completed: 30,
+ todayTasks: 12,
+ activityRate: 98,
+ };
+
+ // 常用功能
+ const commonFeatures = [
+ {
+ id: "auto-like",
+ name: "自动点赞",
+ description: "智能自动点赞互动",
+ icon: (
+
+ ),
+ path: "/workspace/auto-like",
+ bgColor: "#fff2f0",
+ isNew: true,
+ },
+ {
+ id: "moments-sync",
+ name: "朋友圈同步",
+ description: "自动同步朋友圈内容",
+ icon: (
+
+ ),
+ path: "/workspace/moments-sync",
+ bgColor: "#f9f0ff",
+ },
+ {
+ id: "group-push",
+ name: "群消息推送",
+ description: "智能群发助手",
+ icon: (
+
+ ),
+ path: "/workspace/group-push",
+ bgColor: "#fff7e6",
+ },
+ {
+ id: "auto-group",
+ name: "自动建群",
+ description: "智能拉好友建群",
+ icon: (
+
+ ),
+ path: "/workspace/auto-group",
+ bgColor: "#f6ffed",
+ },
+ {
+ id: "traffic-distribution",
+ name: "流量分发",
+ description: "管理流量分发和分配",
+ icon: (
+
+ ),
+ path: "/workspace/traffic-distribution",
+ bgColor: "#e6f7ff",
+ },
+ {
+ id: "ai-assistant",
+ name: "AI对话助手",
+ description: "智能回复,提高互动质量",
+ icon: (
+
+ ),
+ path: "/workspace/ai-assistant",
+ bgColor: "#e6f7ff",
+ isNew: true,
+ },
+ ];
+
+ // AI智能助手
+ const aiFeatures = [
+ {
+ id: "ai-analyzer",
+ name: "AI数据分析",
+ description: "智能分析客户行为特征",
+ icon: (
+
+ ),
+ path: "/workspace/ai-analyzer",
+ bgColor: "#f0f0ff",
+ isNew: true,
+ },
+ {
+ id: "ai-strategy",
+ name: "AI策略优化",
+ description: "智能优化获客策略",
+ icon:
,
+ path: "/workspace/ai-strategy",
+ bgColor: "#e6fffb",
+ isNew: true,
+ },
+ {
+ id: "ai-forecast",
+ name: "AI销售预测",
+ description: "智能预测销售趋势",
+ icon: (
+
+ ),
+ path: "/workspace/ai-forecast",
+ bgColor: "#fffbe6",
+ },
+ ];
+
+ return (
+
+
+ 工作台
+
+
+ }
+ footer={}
+ >
+
+ {/* 任务统计卡片 */}
+
+
+ 总任务数
+ {taskStats.total}
+
+
+ 进行中: {taskStats.inProgress} / 已完成: {taskStats.completed}
+
+
+
+
+ 今日任务
+
+ {taskStats.todayTasks}
+
+
+
+
活跃度 {taskStats.activityRate}%
+
+
+
+
+ {/* 常用功能 */}
+
+
常用功能
+
+ {commonFeatures.map((feature) => (
+
+
+
+ {feature.icon}
+
+
+
{feature.name}
+ {feature.isNew && (
+
+ )}
+
+
+ {feature.description}
+
+
+
+ ))}
+
+
+
+ {/* AI智能助手 */}
+
+
AI 智能助手
+
+ {aiFeatures.map((feature) => (
+
+
+
+ {feature.icon}
+
+
+
{feature.name}
+ {feature.isNew && (
+
+ )}
+
+
+ {feature.description}
+
+
+
+ ))}
+
+
+
+
+ );
+};
+
+export default Workspace;
diff --git a/nkebao/src/pages/workspace/ai-assistant/AIAssistant.tsx b/nkebao/src/pages/workspace/ai-assistant/AIAssistant.tsx
new file mode 100644
index 00000000..2727f453
--- /dev/null
+++ b/nkebao/src/pages/workspace/ai-assistant/AIAssistant.tsx
@@ -0,0 +1,8 @@
+import React from "react";
+import PlaceholderPage from "@/components/PlaceholderPage";
+
+const AIAssistant: React.FC = () => {
+ return
;
+};
+
+export default AIAssistant;
diff --git a/nkebao/src/pages/workspace/auto-group/AutoGroup.tsx b/nkebao/src/pages/workspace/auto-group/AutoGroup.tsx
new file mode 100644
index 00000000..935827d6
--- /dev/null
+++ b/nkebao/src/pages/workspace/auto-group/AutoGroup.tsx
@@ -0,0 +1,10 @@
+import React from "react";
+import PlaceholderPage from "@/components/PlaceholderPage";
+
+const AutoGroup: React.FC = () => {
+ return (
+
+ );
+};
+
+export default AutoGroup;
diff --git a/nkebao/src/pages/workspace/auto-group/Detail.tsx b/nkebao/src/pages/workspace/auto-group/Detail.tsx
new file mode 100644
index 00000000..db34f334
--- /dev/null
+++ b/nkebao/src/pages/workspace/auto-group/Detail.tsx
@@ -0,0 +1,8 @@
+import React from "react";
+import PlaceholderPage from "@/components/PlaceholderPage";
+
+const AutoGroupDetail: React.FC = () => {
+ return
;
+};
+
+export default AutoGroupDetail;
diff --git a/nkebao/src/pages/workspace/auto-like/AutoLike.tsx b/nkebao/src/pages/workspace/auto-like/AutoLike.tsx
new file mode 100644
index 00000000..35f84a96
--- /dev/null
+++ b/nkebao/src/pages/workspace/auto-like/AutoLike.tsx
@@ -0,0 +1,38 @@
+import React from "react";
+import { NavBar, Button } from "antd-mobile";
+import { AddOutline } from "antd-mobile-icons";
+import Layout from "@/components/Layout/Layout";
+import MeauMobile from "@/components/MeauMobile/MeauMoible";
+
+const AutoLike: React.FC = () => {
+ return (
+
window.history.back()}
+ left={
+
+ 自动点赞
+
+ }
+ right={
+
+ }
+ />
+ }
+ footer={}
+ >
+
+
+ );
+};
+
+export default AutoLike;
diff --git a/nkebao/src/pages/workspace/auto-like/AutoLikeDetail.tsx b/nkebao/src/pages/workspace/auto-like/AutoLikeDetail.tsx
new file mode 100644
index 00000000..08811261
--- /dev/null
+++ b/nkebao/src/pages/workspace/auto-like/AutoLikeDetail.tsx
@@ -0,0 +1,8 @@
+import React from "react";
+import PlaceholderPage from "@/components/PlaceholderPage";
+
+const AutoLikeDetail: React.FC = () => {
+ return
;
+};
+
+export default AutoLikeDetail;
diff --git a/nkebao/src/pages/workspace/auto-like/NewAutoLike.tsx b/nkebao/src/pages/workspace/auto-like/NewAutoLike.tsx
new file mode 100644
index 00000000..12bf9b7e
--- /dev/null
+++ b/nkebao/src/pages/workspace/auto-like/NewAutoLike.tsx
@@ -0,0 +1,30 @@
+import React from "react";
+import { NavBar } from "antd-mobile";
+import Layout from "@/components/Layout/Layout";
+import MeauMobile from "@/components/MeauMobile/MeauMoible";
+
+const NewAutoLike: React.FC = () => {
+ return (
+
window.history.back()}
+ >
+
+ 新建自动点赞
+
+
+ }
+ footer={}
+ >
+
+
新建自动点赞页面
+
此页面正在开发中...
+
+
+ );
+};
+
+export default NewAutoLike;
diff --git a/nkebao/src/pages/workspace/group-push/GroupPush.tsx b/nkebao/src/pages/workspace/group-push/GroupPush.tsx
new file mode 100644
index 00000000..382dab52
--- /dev/null
+++ b/nkebao/src/pages/workspace/group-push/GroupPush.tsx
@@ -0,0 +1,10 @@
+import React from "react";
+import PlaceholderPage from "@/components/PlaceholderPage";
+
+const GroupPush: React.FC = () => {
+ return (
+
+ );
+};
+
+export default GroupPush;
diff --git a/nkebao/src/pages/workspace/group-push/new.tsx b/nkebao/src/pages/workspace/group-push/new.tsx
new file mode 100644
index 00000000..7147f70c
--- /dev/null
+++ b/nkebao/src/pages/workspace/group-push/new.tsx
@@ -0,0 +1,8 @@
+import React from "react";
+import PlaceholderPage from "@/components/PlaceholderPage";
+
+const NewGroupPush: React.FC = () => {
+ return
;
+};
+
+export default NewGroupPush;
diff --git a/nkebao/src/pages/work/api.ts b/nkebao/src/pages/workspace/main/api.ts
similarity index 100%
rename from nkebao/src/pages/work/api.ts
rename to nkebao/src/pages/workspace/main/api.ts
diff --git a/nkebao/src/pages/work/index.module.scss b/nkebao/src/pages/workspace/main/index.module.scss
similarity index 100%
rename from nkebao/src/pages/work/index.module.scss
rename to nkebao/src/pages/workspace/main/index.module.scss
diff --git a/nkebao/src/pages/work/index.tsx b/nkebao/src/pages/workspace/main/index.tsx
similarity index 100%
rename from nkebao/src/pages/work/index.tsx
rename to nkebao/src/pages/workspace/main/index.tsx
diff --git a/nkebao/src/pages/workspace/moments-sync/Detail.tsx b/nkebao/src/pages/workspace/moments-sync/Detail.tsx
new file mode 100644
index 00000000..b46fd03c
--- /dev/null
+++ b/nkebao/src/pages/workspace/moments-sync/Detail.tsx
@@ -0,0 +1,8 @@
+import React from "react";
+import PlaceholderPage from "@/components/PlaceholderPage";
+
+const MomentsSyncDetail: React.FC = () => {
+ return
;
+};
+
+export default MomentsSyncDetail;
diff --git a/nkebao/src/pages/workspace/moments-sync/MomentsSync.tsx b/nkebao/src/pages/workspace/moments-sync/MomentsSync.tsx
new file mode 100644
index 00000000..b4564f83
--- /dev/null
+++ b/nkebao/src/pages/workspace/moments-sync/MomentsSync.tsx
@@ -0,0 +1,14 @@
+import React from "react";
+import PlaceholderPage from "@/components/PlaceholderPage";
+
+const MomentsSync: React.FC = () => {
+ return (
+
+ );
+};
+
+export default MomentsSync;
diff --git a/nkebao/src/pages/workspace/moments-sync/new.tsx b/nkebao/src/pages/workspace/moments-sync/new.tsx
new file mode 100644
index 00000000..b32d13a6
--- /dev/null
+++ b/nkebao/src/pages/workspace/moments-sync/new.tsx
@@ -0,0 +1,8 @@
+import React from "react";
+import PlaceholderPage from "@/components/PlaceholderPage";
+
+const NewMomentsSync: React.FC = () => {
+ return
;
+};
+
+export default NewMomentsSync;
diff --git a/nkebao/src/pages/workspace/traffic-distribution/Detail.tsx b/nkebao/src/pages/workspace/traffic-distribution/Detail.tsx
new file mode 100644
index 00000000..f3469de1
--- /dev/null
+++ b/nkebao/src/pages/workspace/traffic-distribution/Detail.tsx
@@ -0,0 +1,8 @@
+import React from "react";
+import PlaceholderPage from "@/components/PlaceholderPage";
+
+const TrafficDistributionDetail: React.FC = () => {
+ return
;
+};
+
+export default TrafficDistributionDetail;
diff --git a/nkebao/src/pages/workspace/traffic-distribution/NewDistribution.tsx b/nkebao/src/pages/workspace/traffic-distribution/NewDistribution.tsx
new file mode 100644
index 00000000..06053b35
--- /dev/null
+++ b/nkebao/src/pages/workspace/traffic-distribution/NewDistribution.tsx
@@ -0,0 +1,8 @@
+import React from "react";
+import PlaceholderPage from "@/components/PlaceholderPage";
+
+const NewDistribution: React.FC = () => {
+ return
;
+};
+
+export default NewDistribution;
diff --git a/nkebao/src/pages/workspace/traffic-distribution/TrafficDistribution.tsx b/nkebao/src/pages/workspace/traffic-distribution/TrafficDistribution.tsx
new file mode 100644
index 00000000..701f347b
--- /dev/null
+++ b/nkebao/src/pages/workspace/traffic-distribution/TrafficDistribution.tsx
@@ -0,0 +1,10 @@
+import React from "react";
+import PlaceholderPage from "@/components/PlaceholderPage";
+
+const TrafficDistribution: React.FC = () => {
+ return (
+
+ );
+};
+
+export default TrafficDistribution;
diff --git a/nkebao/src/router/config.ts b/nkebao/src/router/config.ts
new file mode 100644
index 00000000..e41b5372
--- /dev/null
+++ b/nkebao/src/router/config.ts
@@ -0,0 +1,171 @@
+// 路由配置类型定义
+export interface RouteConfig {
+ path: string;
+ element: React.ReactNode;
+ auth: boolean;
+ requiredRole?: string;
+ title?: string;
+ icon?: string;
+ children?: RouteConfig[];
+}
+
+// 路由分组配置
+export const routeGroups = {
+ // 基础路由
+ basic: {
+ name: "基础功能",
+ routes: ["/", "/login", "/scene", "/work", "/mine"],
+ },
+
+ // 设备管理
+ devices: {
+ name: "设备管理",
+ routes: ["/devices", "/devices/:id"],
+ },
+
+ // 微信号管理
+ wechatAccounts: {
+ name: "微信号管理",
+ routes: ["/wechat-accounts", "/wechat-accounts/:id"],
+ },
+
+ // 工作台
+ workspace: {
+ name: "工作台",
+ routes: [
+ "/workspace",
+ "/workspace/auto-like",
+ "/workspace/auto-like/new",
+ "/workspace/auto-like/:id",
+ "/workspace/auto-like/:id/edit",
+ "/workspace/auto-group",
+ "/workspace/auto-group/:id",
+ "/workspace/group-push",
+ "/workspace/group-push/new",
+ "/workspace/group-push/:id",
+ "/workspace/group-push/:id/edit",
+ "/workspace/moments-sync",
+ "/workspace/moments-sync/new",
+ "/workspace/moments-sync/:id",
+ "/workspace/moments-sync/edit/:id",
+ "/workspace/ai-assistant",
+ "/workspace/traffic-distribution",
+ "/workspace/traffic-distribution/new",
+ "/workspace/traffic-distribution/edit/:id",
+ "/workspace/traffic-distribution/:id",
+ ],
+ },
+
+ // 场景管理
+ scenarios: {
+ name: "场景管理",
+ routes: [
+ "/scenarios",
+ "/scenarios/new",
+ "/scenarios/new/:scenarioId",
+ "/scenarios/edit/:planId",
+ "/scenarios/list/:scenarioId/:scenarioName",
+ ],
+ },
+
+ // 内容管理
+ content: {
+ name: "内容管理",
+ routes: [
+ "/content",
+ "/content/new",
+ "/content/edit/:id",
+ "/content/materials/:id",
+ "/content/materials/new/:id",
+ "/content/materials/edit/:id/:materialId",
+ ],
+ },
+
+ // 流量池
+ trafficPool: {
+ name: "流量池",
+ routes: ["/traffic-pool", "/traffic-pool/:id"],
+ },
+
+ // 其他功能
+ other: {
+ name: "其他功能",
+ routes: [
+ "/profile",
+ "/plans",
+ "/plans/:planId",
+ "/orders",
+ "/contact-import",
+ ],
+ },
+};
+
+// 路由权限配置
+export const routePermissions = {
+ // 管理员权限
+ admin: Object.values(routeGroups).flatMap(group => group.routes),
+
+ // 普通用户权限
+ user: [
+ "/",
+ "/login",
+ "/scene",
+ "/work",
+ "/mine",
+ "/devices",
+ "/devices/:id",
+ "/wechat-accounts",
+ "/wechat-accounts/:id",
+ "/workspace",
+ "/scenarios",
+ "/content",
+ "/traffic-pool",
+ "/traffic-pool/:id",
+ "/profile",
+ "/plans",
+ "/plans/:planId",
+ "/orders",
+ "/contact-import",
+ ],
+
+ // 访客权限
+ guest: ["/", "/login"],
+};
+
+// 路由标题映射
+export const routeTitles: Record
= {
+ "/": "首页",
+ "/login": "登录",
+ "/scene": "场景获客",
+ "/work": "工作台",
+ "/mine": "我的",
+ "/devices": "设备管理",
+ "/wechat-accounts": "微信号管理",
+ "/workspace": "工作台",
+ "/scenarios": "场景管理",
+ "/content": "内容管理",
+ "/traffic-pool": "流量池",
+ "/profile": "个人中心",
+ "/plans": "计划管理",
+ "/orders": "订单管理",
+ "/contact-import": "联系人导入",
+};
+
+// 获取路由标题
+export const getRouteTitle = (path: string): string => {
+ return routeTitles[path] || "页面";
+};
+
+// 检查路由权限
+export const checkRoutePermission = (
+ path: string,
+ userRole: string = "user"
+): boolean => {
+ const allowedRoutes = routePermissions[userRole as keyof typeof routePermissions] || [];
+ return allowedRoutes.some(route => {
+ // 简单的路径匹配,支持动态参数
+ const routePattern = route.replace(/:[^/]+/g, "[^/]+");
+ const regex = new RegExp(`^${routePattern}$`);
+ return regex.test(path);
+ });
+};
\ No newline at end of file
diff --git a/nkebao/src/router/module/auth.tsx b/nkebao/src/router/module/auth.tsx
new file mode 100644
index 00000000..d6ddc5cf
--- /dev/null
+++ b/nkebao/src/router/module/auth.tsx
@@ -0,0 +1,11 @@
+import Login from "@/pages/login/login";
+
+const authRoutes = [
+ {
+ path: "/login",
+ element: ,
+ auth: false, // 不需要权限
+ },
+];
+
+export default authRoutes;
diff --git a/nkebao/src/router/module/content.tsx b/nkebao/src/router/module/content.tsx
new file mode 100644
index 00000000..7e941805
--- /dev/null
+++ b/nkebao/src/router/module/content.tsx
@@ -0,0 +1,39 @@
+import Content from "@/pages/content/Content";
+import NewContent from "@/pages/content/NewContent";
+import Materials from "@/pages/content/materials/List";
+import MaterialsNew from "@/pages/content/materials/New";
+
+const contentRoutes = [
+ {
+ path: "/content",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/content/new",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/content/edit/:id",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/content/materials/:id",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/content/materials/new/:id",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/content/materials/edit/:id/:materialId",
+ element: ,
+ auth: true,
+ },
+];
+
+export default contentRoutes;
diff --git a/nkebao/src/router/module/devices.tsx b/nkebao/src/router/module/devices.tsx
new file mode 100644
index 00000000..d31db945
--- /dev/null
+++ b/nkebao/src/router/module/devices.tsx
@@ -0,0 +1,17 @@
+import Devices from "@/pages/devices/Devices";
+import DeviceDetail from "@/pages/devices/DeviceDetail";
+
+const deviceRoutes = [
+ {
+ path: "/devices",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/devices/:id",
+ element: ,
+ auth: true,
+ },
+];
+
+export default deviceRoutes;
diff --git a/nkebao/src/router/module/index.tsx b/nkebao/src/router/module/index.tsx
index f92633a8..60033084 100644
--- a/nkebao/src/router/module/index.tsx
+++ b/nkebao/src/router/module/index.tsx
@@ -1,20 +1,15 @@
import Home from "@/pages/home/index";
-import Login from "@/pages/login/login";
import Scene from "@/pages/scene/index";
-import Work from "@/pages/work/index";
import Mine from "@/pages/mine/index";
+import Workspace from "@/pages/workspace/main";
const routes = [
+ // 基础路由
{
path: "/",
element: ,
auth: true, // 需要登录
},
- {
- path: "/login",
- element: ,
- auth: false, // 不需要权限
- },
{
path: "/scene",
element: ,
@@ -22,7 +17,7 @@ const routes = [
},
{
path: "/work",
- element: ,
+ element: ,
auth: true,
},
{
diff --git a/nkebao/src/router/module/other.tsx b/nkebao/src/router/module/other.tsx
new file mode 100644
index 00000000..a458b7dc
--- /dev/null
+++ b/nkebao/src/router/module/other.tsx
@@ -0,0 +1,40 @@
+import Profile from "@/pages/profile/Profile";
+import Plans from "@/pages/plans/Plans";
+import PlanDetail from "@/pages/plans/PlanDetail";
+import Orders from "@/pages/orders/Orders";
+import ContactImport from "@/pages/contact-import/ContactImport";
+
+const otherRoutes = [
+ {
+ path: "/mine",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/profile",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/plans",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/plans/:planId",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/orders",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/contact-import",
+ element: ,
+ auth: true,
+ },
+];
+
+export default otherRoutes;
diff --git a/nkebao/src/router/module/scenarios.tsx b/nkebao/src/router/module/scenarios.tsx
new file mode 100644
index 00000000..ff561561
--- /dev/null
+++ b/nkebao/src/router/module/scenarios.tsx
@@ -0,0 +1,38 @@
+import Scenarios from "@/pages/scenarios/Scenarios";
+import NewPlan from "@/pages/scenarios/new/page";
+import ScenarioList from "@/pages/scenarios/ScenarioList";
+
+const scenarioRoutes = [
+ {
+ path: "/scene",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/scenarios",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/scenarios/new",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/scenarios/new/:scenarioId",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/scenarios/edit/:planId",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/scenarios/list/:scenarioId/:scenarioName",
+ element: ,
+ auth: true,
+ },
+];
+
+export default scenarioRoutes;
diff --git a/nkebao/src/router/module/traffic-pool.tsx b/nkebao/src/router/module/traffic-pool.tsx
new file mode 100644
index 00000000..d0dcd70d
--- /dev/null
+++ b/nkebao/src/router/module/traffic-pool.tsx
@@ -0,0 +1,17 @@
+import TrafficPool from "@/pages/traffic-pool/TrafficPool";
+import TrafficPoolDetail from "@/pages/traffic-pool/TrafficPoolDetail";
+
+const trafficPoolRoutes = [
+ {
+ path: "/traffic-pool",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/traffic-pool/:id",
+ element: ,
+ auth: true,
+ },
+];
+
+export default trafficPoolRoutes;
diff --git a/nkebao/src/router/module/wechat-accounts.tsx b/nkebao/src/router/module/wechat-accounts.tsx
new file mode 100644
index 00000000..496ab006
--- /dev/null
+++ b/nkebao/src/router/module/wechat-accounts.tsx
@@ -0,0 +1,17 @@
+import WechatAccounts from "@/pages/wechat-accounts/WechatAccounts";
+import WechatAccountDetail from "@/pages/wechat-accounts/WechatAccountDetail";
+
+const wechatAccountRoutes = [
+ {
+ path: "/wechat-accounts",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/wechat-accounts/:id",
+ element: ,
+ auth: true,
+ },
+];
+
+export default wechatAccountRoutes;
diff --git a/nkebao/src/router/module/workspace.tsx b/nkebao/src/router/module/workspace.tsx
new file mode 100644
index 00000000..64fdf386
--- /dev/null
+++ b/nkebao/src/router/module/workspace.tsx
@@ -0,0 +1,145 @@
+import Workspace from "@/pages/workspace/Workspace";
+import AutoLike from "@/pages/workspace/auto-like/AutoLike";
+import NewAutoLike from "@/pages/workspace/auto-like/NewAutoLike";
+import AutoLikeDetail from "@/pages/workspace/auto-like/AutoLikeDetail";
+import AutoGroup from "@/pages/workspace/auto-group/AutoGroup";
+import AutoGroupDetail from "@/pages/workspace/auto-group/Detail";
+import GroupPush from "@/pages/workspace/group-push/GroupPush";
+import NewGroupPush from "@/pages/workspace/group-push/new";
+import MomentsSync from "@/pages/workspace/moments-sync/MomentsSync";
+import MomentsSyncDetail from "@/pages/workspace/moments-sync/Detail";
+import NewMomentsSync from "@/pages/workspace/moments-sync/new";
+import AIAssistant from "@/pages/workspace/ai-assistant/AIAssistant";
+import TrafficDistribution from "@/pages/workspace/traffic-distribution/TrafficDistribution";
+import TrafficDistributionDetail from "@/pages/workspace/traffic-distribution/Detail";
+import NewDistribution from "@/pages/workspace/traffic-distribution/NewDistribution";
+import PlaceholderPage from "@/components/PlaceholderPage";
+
+const workspaceRoutes = [
+ {
+ path: "/workspace",
+ element: ,
+ auth: true,
+ },
+ // 自动点赞
+ {
+ path: "/workspace/auto-like",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/workspace/auto-like/new",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/workspace/auto-like/:id",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/workspace/auto-like/:id/edit",
+ element: ,
+ auth: true,
+ },
+ // 自动分组
+ {
+ path: "/workspace/auto-group",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/workspace/auto-group/:id",
+ element: ,
+ auth: true,
+ },
+ // 群发推送
+ {
+ path: "/workspace/group-push",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/workspace/group-push/new",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/workspace/group-push/:id",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/workspace/group-push/:id/edit",
+ element: ,
+ auth: true,
+ },
+ // 朋友圈同步
+ {
+ path: "/workspace/moments-sync",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/workspace/moments-sync/new",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/workspace/moments-sync/:id",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/workspace/moments-sync/edit/:id",
+ element: ,
+ auth: true,
+ },
+ // AI助手
+ {
+ path: "/workspace/ai-assistant",
+ element: ,
+ auth: true,
+ },
+ // AI数据分析
+ {
+ path: "/workspace/ai-analyzer",
+ element: ,
+ auth: true,
+ },
+ // AI策略优化
+ {
+ path: "/workspace/ai-strategy",
+ element: ,
+ auth: true,
+ },
+ // AI销售预测
+ {
+ path: "/workspace/ai-forecast",
+ element: ,
+ auth: true,
+ },
+ // 流量分发
+ {
+ path: "/workspace/traffic-distribution",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/workspace/traffic-distribution/new",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/workspace/traffic-distribution/edit/:id",
+ element: ,
+ auth: true,
+ },
+ {
+ path: "/workspace/traffic-distribution/:id",
+ element: ,
+ auth: true,
+ },
+];
+
+export default workspaceRoutes;
diff --git a/nkebao/src/styles/global.scss b/nkebao/src/styles/global.scss
index 079b5d0c..bf7670a8 100644
--- a/nkebao/src/styles/global.scss
+++ b/nkebao/src/styles/global.scss
@@ -122,4 +122,13 @@ input, textarea {
/* 安卓部分 WebView 点击延迟优化 */
body, input, textarea, select, button {
touch-action: manipulation;
-}
\ No newline at end of file
+}
+//导航左右结构的样式
+.nav-left {
+ color: var(--primary-color);
+ font-weight: 700;
+ font-size: 16px;
+}
+.nav-right {
+ font-size: 12px;
+}
\ No newline at end of file