FEAT => 本次更新项目为:统一内容管理的导航路径,将所有相关路径前缀修改为 "/mine/content",以提升路由结构的一致性和用户体验。

This commit is contained in:
超级老白兔
2025-08-11 11:27:49 +08:00
parent 90f29da343
commit bea245ced9
14 changed files with 23 additions and 41 deletions

View File

@@ -168,7 +168,7 @@ const ContentLibraryList: React.FC = () => {
};
const handleViewMaterials = (id: string) => {
navigate(`/content/materials/${id}`);
navigate(`/mine/content/materials/${id}`);
};
const handleSearch = () => {

View File

@@ -158,7 +158,7 @@ const MaterialForm: React.FC = () => {
content: isEdit ? "更新成功" : "创建成功",
position: "top",
});
navigate(`/content/materials/${libraryId}`);
navigate(`/mine/content/materials/${libraryId}`);
} catch (error: unknown) {
console.error("保存素材失败:", error);
Toast.show({
@@ -171,7 +171,7 @@ const MaterialForm: React.FC = () => {
};
const handleBack = () => {
navigate(`/content/materials/${libraryId}`);
navigate(`/mine/content/materials/${libraryId}`);
};
if (loading) {

View File

@@ -72,11 +72,11 @@ const MaterialsList: React.FC = () => {
}, [fetchMaterials]);
const handleCreateNew = () => {
navigate(`/content/materials/new/${id}`);
navigate(`/mine/content/materials/new/${id}`);
};
const handleEdit = (materialId: number) => {
navigate(`/content/materials/edit/${id}/${materialId}`);
navigate(`/mine/content/materials/edit/${id}/${materialId}`);
};
const handleDelete = async (materialId: number) => {

View File

@@ -168,7 +168,7 @@ const ContentLibraryList: React.FC = () => {
};
const handleViewMaterials = (id: string) => {
navigate(`/content/materials/${id}`);
navigate(`/mine/content/materials/${id}`);
};
const handleRefresh = () => {

View File

@@ -158,7 +158,7 @@ const MaterialForm: React.FC = () => {
content: isEdit ? "更新成功" : "创建成功",
position: "top",
});
navigate(`/content/materials/${libraryId}`);
navigate(`/mine/content/materials/${libraryId}`);
} catch (error: unknown) {
console.error("保存素材失败:", error);
Toast.show({
@@ -171,7 +171,7 @@ const MaterialForm: React.FC = () => {
};
const handleBack = () => {
navigate(`/content/materials/${libraryId}`);
navigate(`/mine/content/materials/${libraryId}`);
};
if (loading) {

View File

@@ -72,11 +72,11 @@ const MaterialsList: React.FC = () => {
}, [fetchMaterials]);
const handleCreateNew = () => {
navigate(`/content/materials/new/${id}`);
navigate(`/mine/content/materials/new/${id}`);
};
const handleEdit = (materialId: number) => {
navigate(`/content/materials/edit/${id}/${materialId}`);
navigate(`/mine/content/materials/edit/${id}/${materialId}`);
};
const handleDelete = async (materialId: number) => {
@@ -109,11 +109,6 @@ const MaterialsList: React.FC = () => {
console.log("查看素材:", materialId);
};
const handleSearch = () => {
setCurrentPage(1);
fetchMaterials();
};
const handleRefresh = () => {
fetchMaterials();
};
@@ -283,6 +278,7 @@ const MaterialsList: React.FC = () => {
<>
<NavCommon
title="素材管理"
backFn={() => navigate("/mine/content")}
right={
<Button type="primary" onClick={handleCreateNew}>
<PlusOutlined />

View File

@@ -132,12 +132,6 @@ const ScenarioList: React.FC = () => {
fetchScenarioData();
}, [scenarioId]);
// 加载下一页数据
const handleLoadMore = async () => {
if (loadingMore || !hasMore) return;
await fetchPlanList(currentPage + 1, true);
};
// 分页改变处理
const handlePageChange = async (page: number) => {
setCurrentPage(page);

View File

@@ -166,6 +166,7 @@ const AutoGroupList: React.FC = () => {
<>
<NavCommon
title="自动建群"
backFn={() => navigate("/workspace")}
right={
<Button size="small" color="primary" onClick={handleCreateNew}>
<PlusOutlined />

View File

@@ -110,10 +110,6 @@ const GroupPush: React.FC = () => {
fetchTasks();
}, []);
const toggleExpand = (taskId: string) => {
setExpandedTaskId(expandedTaskId === taskId ? null : taskId);
};
const handleDelete = async (taskId: string) => {
if (!window.confirm("确定要删除该任务吗?")) return;
await deleteGroupPushTask(taskId);
@@ -178,6 +174,7 @@ const GroupPush: React.FC = () => {
<>
<NavCommon
title="群消息推送"
backFn={() => navigate("/workspace")}
right={
<Button
type="primary"

View File

@@ -1,6 +1,6 @@
import React from "react";
import { Link } from "react-router-dom";
import { Card, NavBar, Badge } from "antd-mobile";
import { Card, Badge } from "antd-mobile";
import {
LikeOutlined,
SendOutlined,

View File

@@ -1,7 +1,7 @@
import React, { useEffect, useState } from "react";
import { useNavigate } from "react-router-dom";
import { Switch, Input, message, Dropdown, Menu } from "antd";
import { NavBar, Button } from "antd-mobile";
import { Button } from "antd-mobile";
import NavCommon from "@/components/NavCommon";
import {
PlusOutlined,
@@ -13,7 +13,6 @@ import {
CopyOutlined,
MoreOutlined,
ClockCircleOutlined,
ArrowLeftOutlined,
} from "@ant-design/icons";
import Layout from "@/components/Layout/Layout";
import style from "./index.module.scss";

View File

@@ -98,7 +98,7 @@
.ruleFooter {
display: flex;
justify-content: space-between;
font-size: 13px;
font-size: 12px;
color: #888;
margin-top: 6px;
align-items: center;

View File

@@ -75,12 +75,6 @@ const TrafficDistributionList: React.FC = () => {
}
};
const handleSearch = (val: string) => {
setSearchQuery(val);
setPage(1);
fetchList(1, val);
};
const handlePageChange = (p: number) => {
setPage(p);
fetchList(p, searchQuery);
@@ -277,6 +271,7 @@ const TrafficDistributionList: React.FC = () => {
<>
<NavCommon
title="流量分发"
backFn={() => navigate("/workspace")}
right={
<Button
type="primary"

View File

@@ -72,12 +72,12 @@ export const routeGroups = {
content: {
name: "内容管理",
routes: [
"/content",
"/content/new",
"/content/edit/:id",
"/content/materials/:id",
"/content/materials/new/:id",
"/content/materials/edit/:id/:materialId",
"/mine/content",
"/mine/content/new",
"/mine/content/edit/:id",
"/mine/content/materials/:id",
"/mine/content/materials/new/:id",
"/mine/content/materials/edit/:id/:materialId",
],
},