feat: 本次提交更新内容如下

定版本,准备大批量迁移
This commit is contained in:
笔记本里的永平
2025-07-19 11:40:02 +08:00
parent 9630389e22
commit b128410346
59 changed files with 2565 additions and 914 deletions

View File

@@ -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;
}
}

View File

@@ -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: (
<ThumbsUpOutline className={styles.icon} style={{ color: "#ff4d4f" }} />
),
path: "/workspace/auto-like",
bgColor: "#fff2f0",
isNew: true,
},
{
id: "moments-sync",
name: "朋友圈同步",
description: "自动同步朋友圈内容",
icon: (
<ClockCircleOutline
className={styles.icon}
style={{ color: "#722ed1" }}
/>
),
path: "/workspace/moments-sync",
bgColor: "#f9f0ff",
},
{
id: "group-push",
name: "群消息推送",
description: "智能群发助手",
icon: (
<SendOutline className={styles.icon} style={{ color: "#fa8c16" }} />
),
path: "/workspace/group-push",
bgColor: "#fff7e6",
},
{
id: "auto-group",
name: "自动建群",
description: "智能拉好友建群",
icon: (
<TeamOutline className={styles.icon} style={{ color: "#52c41a" }} />
),
path: "/workspace/auto-group",
bgColor: "#f6ffed",
},
{
id: "traffic-distribution",
name: "流量分发",
description: "管理流量分发和分配",
icon: (
<ShareOutline className={styles.icon} style={{ color: "#1890ff" }} />
),
path: "/workspace/traffic-distribution",
bgColor: "#e6f7ff",
},
{
id: "ai-assistant",
name: "AI对话助手",
description: "智能回复,提高互动质量",
icon: (
<MessageOutline className={styles.icon} style={{ color: "#1890ff" }} />
),
path: "/workspace/ai-assistant",
bgColor: "#e6f7ff",
isNew: true,
},
];
// AI智能助手
const aiFeatures = [
{
id: "ai-analyzer",
name: "AI数据分析",
description: "智能分析客户行为特征",
icon: (
<BarChartOutline className={styles.icon} style={{ color: "#531dab" }} />
),
path: "/workspace/ai-analyzer",
bgColor: "#f0f0ff",
isNew: true,
},
{
id: "ai-strategy",
name: "AI策略优化",
description: "智能优化获客策略",
icon: <AppOutline className={styles.icon} style={{ color: "#13c2c2" }} />,
path: "/workspace/ai-strategy",
bgColor: "#e6fffb",
isNew: true,
},
{
id: "ai-forecast",
name: "AI销售预测",
description: "智能预测销售趋势",
icon: (
<LineChartOutline
className={styles.icon}
style={{ color: "#d48806" }}
/>
),
path: "/workspace/ai-forecast",
bgColor: "#fffbe6",
},
];
return (
<Layout
header={
<NavBar back={null} style={{ background: "#fff" }}>
<div style={{ color: "var(--primary-color)", fontWeight: 600 }}>
</div>
</NavBar>
}
footer={<MeauMobile />}
>
<div className={styles.workspace}>
{/* 任务统计卡片 */}
<div className={styles.statsGrid}>
<Card className={styles.statsCard}>
<div className={styles.statsTitle}></div>
<div className={styles.statsValue}>{taskStats.total}</div>
<Progress
percent={(taskStats.inProgress / taskStats.total) * 100}
className={styles.progress}
/>
<div className={styles.statsSubtitle}>
: {taskStats.inProgress} / : {taskStats.completed}
</div>
</Card>
<Card className={styles.statsCard}>
<div className={styles.statsTitle}></div>
<div className={styles.statsValue} style={{ color: "#52c41a" }}>
{taskStats.todayTasks}
</div>
<div className={styles.activityRate}>
<svg
className={styles.activityIcon}
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M3 12H7L10 19L14 5L17 12H21"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
<span> {taskStats.activityRate}%</span>
</div>
</Card>
</div>
{/* 常用功能 */}
<div className={styles.section}>
<h2 className={styles.sectionTitle}></h2>
<div className={styles.featuresGrid}>
{commonFeatures.map((feature) => (
<Link
to={feature.path}
key={feature.id}
className={styles.featureLink}
>
<Card className={styles.featureCard}>
<div
className={styles.featureIcon}
style={{ backgroundColor: feature.bgColor }}
>
{feature.icon}
</div>
<div className={styles.featureHeader}>
<div className={styles.featureName}>{feature.name}</div>
{feature.isNew && (
<Badge content="New" className={styles.newBadge} />
)}
</div>
<div className={styles.featureDescription}>
{feature.description}
</div>
</Card>
</Link>
))}
</div>
</div>
{/* AI智能助手 */}
<div className={styles.section}>
<h2 className={styles.sectionTitle}>AI </h2>
<div className={styles.featuresGrid}>
{aiFeatures.map((feature) => (
<Link
to={feature.path}
key={feature.id}
className={styles.featureLink}
>
<Card className={styles.featureCard}>
<div
className={styles.featureIcon}
style={{ backgroundColor: feature.bgColor }}
>
{feature.icon}
</div>
<div className={styles.featureHeader}>
<div className={styles.featureName}>{feature.name}</div>
{feature.isNew && (
<Badge content="New" className={styles.newBadge} />
)}
</div>
<div className={styles.featureDescription}>
{feature.description}
</div>
</Card>
</Link>
))}
</div>
</div>
</div>
</Layout>
);
};
export default Workspace;

View File

@@ -0,0 +1,8 @@
import React from "react";
import PlaceholderPage from "@/components/PlaceholderPage";
const AIAssistant: React.FC = () => {
return <PlaceholderPage title="AI助手" showBack={false} />;
};
export default AIAssistant;

View File

@@ -0,0 +1,10 @@
import React from "react";
import PlaceholderPage from "@/components/PlaceholderPage";
const AutoGroup: React.FC = () => {
return (
<PlaceholderPage title="自动分组" showAddButton addButtonText="新建分组" />
);
};
export default AutoGroup;

View File

@@ -0,0 +1,8 @@
import React from "react";
import PlaceholderPage from "@/components/PlaceholderPage";
const AutoGroupDetail: React.FC = () => {
return <PlaceholderPage title="自动分组详情" />;
};
export default AutoGroupDetail;

View File

@@ -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 (
<Layout
header={
<NavBar
backArrow
style={{ background: "#fff" }}
onBack={() => window.history.back()}
left={
<div style={{ color: "var(--primary-color)", fontWeight: 600 }}>
</div>
}
right={
<Button size="small" color="primary">
<AddOutline />
<span style={{ marginLeft: 4, fontSize: 12 }}></span>
</Button>
}
/>
}
footer={<MeauMobile />}
>
<div style={{ padding: 20, textAlign: "center", color: "#666" }}>
<h3></h3>
<p>...</p>
</div>
</Layout>
);
};
export default AutoLike;

View File

@@ -0,0 +1,8 @@
import React from "react";
import PlaceholderPage from "@/components/PlaceholderPage";
const AutoLikeDetail: React.FC = () => {
return <PlaceholderPage title="自动点赞详情" />;
};
export default AutoLikeDetail;

View File

@@ -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 (
<Layout
header={
<NavBar
backArrow
style={{ background: "#fff" }}
onBack={() => window.history.back()}
>
<div style={{ color: "var(--primary-color)", fontWeight: 600 }}>
</div>
</NavBar>
}
footer={<MeauMobile />}
>
<div style={{ padding: 20, textAlign: "center", color: "#666" }}>
<h3></h3>
<p>...</p>
</div>
</Layout>
);
};
export default NewAutoLike;

View File

@@ -0,0 +1,10 @@
import React from "react";
import PlaceholderPage from "@/components/PlaceholderPage";
const GroupPush: React.FC = () => {
return (
<PlaceholderPage title="群发推送" showAddButton addButtonText="新建推送" />
);
};
export default GroupPush;

View File

@@ -0,0 +1,8 @@
import React from "react";
import PlaceholderPage from "@/components/PlaceholderPage";
const NewGroupPush: React.FC = () => {
return <PlaceholderPage title="新建群发推送" />;
};
export default NewGroupPush;

View File

@@ -0,0 +1,14 @@
import request from '@/api/request';
// 设备统计
export function getDeviceStats() {
return request('/v1/dashboard/device-stats', {}, 'GET');
}
// 微信号统计
export function getWechatStats() {
return request('/v1/dashboard/wechat-stats', {}, 'GET');
}
// 你可以根据需要继续添加其他接口
// 例如:场景获客统计、今日数据统计等

View File

@@ -0,0 +1,71 @@
.home-page {
padding: 12px;
background: #f5f5f5;
}
.home-cards {
display: flex;
gap: 12px;
margin-bottom: 12px;
> :global(.adm-card) {
flex: 1;
}
}
.home-section {
margin-bottom: 12px;
background: #fff;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.home-section-title {
font-size: 16px;
font-weight: 600;
margin-bottom: 15px;
padding-left: 16px;
}
.home-scene-stats {
display: flex;
justify-content: space-between;
margin: 0 8px 8px 8px;
}
.home-scene-item {
flex: 1;
text-align: center;
}
.home-scene-icon {
margin: 0 auto 4px auto;
}
.home-scene-value {
font-size: 18px;
font-weight: bold;
color: #1677ff;
}
.home-scene-label {
font-size: 12px;
color: #888;
}
.home-today-item {
text-align: center;
padding: 8px 0;
background: #f7f8fa;
border-radius: 8px;
}
.home-today-value {
font-size: 18px;
font-weight: bold;
color: #1677ff;
}
.home-today-label {
font-size: 12px;
color: #888;
}
.home-chart {
margin-top: 8px;
width: 100%;
min-height: 100px;
}

View File

@@ -0,0 +1,132 @@
import React, { useState } from "react";
import { Card, NavBar, TabBar, Grid } from "antd-mobile";
import {
AppOutline,
UserOutline,
PieOutline, // 替换 BarChartOutline
ShopbagOutline,
BellOutline,
} from "antd-mobile-icons";
import MeauMobile from "@/components/MeauMobile/MeauMoible";
import Layout from "@/components/Layout/Layout";
import style from "./index.module.scss";
const sceneStats = [
{
label: "公众号获客",
value: 234,
icon: <ShopbagOutline style={{ fontSize: 28, color: "#4caf50" }} />,
},
{
label: "海报获客",
value: 167,
icon: <AppOutline style={{ fontSize: 28, color: "#ff9800" }} />,
},
{
label: "抖音获客",
value: 156,
icon: <PieOutline style={{ fontSize: 28, color: "#2196f3" }} />,
},
{
label: "小红书获客",
value: 89,
icon: <UserOutline style={{ fontSize: 28, color: "#e91e63" }} />,
},
];
const todayStats = [
{ label: "朋友圈同步", value: 12 },
{ label: "群发任务", value: 8 },
{ label: "获客转化", value: "85%" },
{ label: "系统活跃度", value: "98%" },
];
const Home: React.FC = () => {
return (
<Layout
header={
<NavBar back={null} style={{ background: "#fff" }}>
<span style={{ color: "#1677ff", fontWeight: 700 }}></span>
</NavBar>
}
footer={<MeauMobile />}
>
<div className={style["home-page"]}>
{/* 统计卡片 */}
<div className={style["home-cards"]}>
<Card className={style["home-card"]}>
<div className={style["home-card-title"]}></div>
<div className={style["home-card-value"]}>0</div>
</Card>
<Card className={style["home-card"]}>
<div className={style["home-card-title"]}></div>
<div className={style["home-card-value"]}>0</div>
</Card>
<Card className={style["home-card"]}>
<div className={style["home-card-title"]}>线</div>
<div className={style["home-card-value"]}>0</div>
</Card>
</div>
{/* 场景获客统计 */}
<Card className={style["home-section"]}>
<div className={style["home-section-title"]}></div>
<div className={style["home-scene-stats"]}>
{sceneStats.map((item) => (
<div key={item.label} className={style["home-scene-item"]}>
<div className={style["home-scene-icon"]}>{item.icon}</div>
<div className={style["home-scene-value"]}>{item.value}</div>
<div className={style["home-scene-label"]}>{item.label}</div>
</div>
))}
</div>
</Card>
{/* 今日数据 */}
<Card className={style["home-section"]}>
<div className={style["home-section-title"]}></div>
<Grid columns={2} gap={12}>
{todayStats.map((item) => (
<Grid.Item key={item.label}>
<div className={style["home-today-item"]}>
<div className={style["home-today-value"]}>{item.value}</div>
<div className={style["home-today-label"]}>{item.label}</div>
</div>
</Grid.Item>
))}
</Grid>
</Card>
{/* 每日获客趋势(静态图表占位) */}
<Card className={style["home-section"]}>
<div className={style["home-section-title"]}></div>
<div className={style["home-chart"]}>
<svg width="100%" height="120">
<polyline
fill="none"
stroke="#1677ff"
strokeWidth="3"
points="10,100 40,80 70,60 100,50 130,40 160,60 190,80"
/>
{/* x轴文字 */}
{["周一", "周二", "周三", "周四", "周五", "周六", "周日"].map(
(d, i) => (
<text
key={d}
x={10 + i * 30}
y={115}
fontSize="12"
textAnchor="middle"
>
{d}
</text>
)
)}
</svg>
</div>
</Card>
</div>
</Layout>
);
};
export default Home;

View File

@@ -0,0 +1,8 @@
import React from "react";
import PlaceholderPage from "@/components/PlaceholderPage";
const MomentsSyncDetail: React.FC = () => {
return <PlaceholderPage title="朋友圈同步详情" />;
};
export default MomentsSyncDetail;

View File

@@ -0,0 +1,14 @@
import React from "react";
import PlaceholderPage from "@/components/PlaceholderPage";
const MomentsSync: React.FC = () => {
return (
<PlaceholderPage
title="朋友圈同步"
showAddButton
addButtonText="新建同步"
/>
);
};
export default MomentsSync;

View File

@@ -0,0 +1,8 @@
import React from "react";
import PlaceholderPage from "@/components/PlaceholderPage";
const NewMomentsSync: React.FC = () => {
return <PlaceholderPage title="新建朋友圈同步" />;
};
export default NewMomentsSync;

View File

@@ -0,0 +1,8 @@
import React from "react";
import PlaceholderPage from "@/components/PlaceholderPage";
const TrafficDistributionDetail: React.FC = () => {
return <PlaceholderPage title="流量分发详情" />;
};
export default TrafficDistributionDetail;

View File

@@ -0,0 +1,8 @@
import React from "react";
import PlaceholderPage from "@/components/PlaceholderPage";
const NewDistribution: React.FC = () => {
return <PlaceholderPage title="新建流量分发" />;
};
export default NewDistribution;

View File

@@ -0,0 +1,10 @@
import React from "react";
import PlaceholderPage from "@/components/PlaceholderPage";
const TrafficDistribution: React.FC = () => {
return (
<PlaceholderPage title="流量分发" showAddButton addButtonText="新建分发" />
);
};
export default TrafficDistribution;