feat: EveryPublish Web 管理端重构与全平台发布接入
- 新增 React + TDesign 管理端(sau_web_react),替代历史 Vue 前端 - 后端接入 11 平台登录/发布(视频+图文),check_cookie 扩展全平台 - 异步发布任务 + 实时进度监控 + 发布日志 - Open API 开放体系(API Key 鉴权 + 7 个开放接口 + API 文档页) - 账号单/批量校验与批量删除 - 全局配置(登录方式 + 发布静默模式) - 统一浏览器为系统 Chrome,品牌文案统一为 EveryPublish
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
import React, { lazy } from 'react';
|
||||
import { BrowserRouterProps } from 'react-router-dom';
|
||||
import dashboard from './modules/dashboard';
|
||||
import account from './modules/account';
|
||||
import material from './modules/material';
|
||||
import publish from './modules/publish';
|
||||
import publishLogs from './modules/publishLogs';
|
||||
import apiDocs from './modules/apiDocs';
|
||||
import about from './modules/about';
|
||||
|
||||
export interface IRouter {
|
||||
path: string;
|
||||
redirect?: string;
|
||||
Component?: React.FC<BrowserRouterProps> | (() => any);
|
||||
/**
|
||||
* 当前路由是否全屏显示
|
||||
*/
|
||||
isFullPage?: boolean;
|
||||
/**
|
||||
* meta未赋值 路由不显示到菜单中
|
||||
*/
|
||||
meta?: {
|
||||
title?: string;
|
||||
Icon?: React.FC;
|
||||
/**
|
||||
* 侧边栏隐藏该路由
|
||||
*/
|
||||
hidden?: boolean;
|
||||
/**
|
||||
* 单层路由
|
||||
*/
|
||||
single?: boolean;
|
||||
};
|
||||
children?: IRouter[];
|
||||
}
|
||||
|
||||
const routes: IRouter[] = [
|
||||
{
|
||||
path: '/',
|
||||
redirect: '/dashboard',
|
||||
},
|
||||
];
|
||||
|
||||
const allRoutes = [...routes, ...dashboard, ...account, ...material, ...publish, ...publishLogs, ...apiDocs, ...about];
|
||||
|
||||
export default allRoutes;
|
||||
@@ -0,0 +1,16 @@
|
||||
import { lazy } from 'react';
|
||||
import { HelpCircleIcon } from 'tdesign-icons-react';
|
||||
import { IRouter } from '../index';
|
||||
|
||||
const about: IRouter[] = [
|
||||
{
|
||||
path: '/about',
|
||||
Component: lazy(() => import('pages/About')),
|
||||
meta: {
|
||||
title: '关于',
|
||||
Icon: HelpCircleIcon,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
export default about;
|
||||
@@ -0,0 +1,16 @@
|
||||
import { lazy } from 'react';
|
||||
import { UsergroupIcon } from 'tdesign-icons-react';
|
||||
import { IRouter } from '../index';
|
||||
|
||||
const account: IRouter[] = [
|
||||
{
|
||||
path: '/account',
|
||||
Component: lazy(() => import('pages/Account')),
|
||||
meta: {
|
||||
title: '账号管理',
|
||||
Icon: UsergroupIcon,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
export default account;
|
||||
@@ -0,0 +1,16 @@
|
||||
import { lazy } from 'react';
|
||||
import { ServiceIcon } from 'tdesign-icons-react';
|
||||
import { IRouter } from '../index';
|
||||
|
||||
const apiDocs: IRouter[] = [
|
||||
{
|
||||
path: '/api-docs',
|
||||
Component: lazy(() => import('pages/ApiDocs')),
|
||||
meta: {
|
||||
title: 'API 文档',
|
||||
Icon: ServiceIcon,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
export default apiDocs;
|
||||
@@ -0,0 +1,16 @@
|
||||
import { lazy } from 'react';
|
||||
import { DashboardIcon } from 'tdesign-icons-react';
|
||||
import { IRouter } from '../index';
|
||||
|
||||
const dashboard: IRouter[] = [
|
||||
{
|
||||
path: '/dashboard',
|
||||
Component: lazy(() => import('pages/Dashboard')),
|
||||
meta: {
|
||||
title: '首页',
|
||||
Icon: DashboardIcon,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
export default dashboard;
|
||||
@@ -0,0 +1,16 @@
|
||||
import { lazy } from 'react';
|
||||
import { FileIcon } from 'tdesign-icons-react';
|
||||
import { IRouter } from '../index';
|
||||
|
||||
const material: IRouter[] = [
|
||||
{
|
||||
path: '/material',
|
||||
Component: lazy(() => import('pages/Material')),
|
||||
meta: {
|
||||
title: '素材管理',
|
||||
Icon: FileIcon,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
export default material;
|
||||
@@ -0,0 +1,16 @@
|
||||
import { lazy } from 'react';
|
||||
import { QueueIcon } from 'tdesign-icons-react';
|
||||
import { IRouter } from '../index';
|
||||
|
||||
const publish: IRouter[] = [
|
||||
{
|
||||
path: '/publish',
|
||||
Component: lazy(() => import('pages/Publish')),
|
||||
meta: {
|
||||
title: '发布中心',
|
||||
Icon: QueueIcon,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
export default publish;
|
||||
@@ -0,0 +1,16 @@
|
||||
import { lazy } from 'react';
|
||||
import { ViewListIcon } from 'tdesign-icons-react';
|
||||
import { IRouter } from '../index';
|
||||
|
||||
const publishLogs: IRouter[] = [
|
||||
{
|
||||
path: '/publish-logs',
|
||||
Component: lazy(() => import('pages/PublishLogs')),
|
||||
meta: {
|
||||
title: '发布日志',
|
||||
Icon: ViewListIcon,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
export default publishLogs;
|
||||
@@ -0,0 +1,16 @@
|
||||
import { lazy } from 'react';
|
||||
import { SettingIcon } from 'tdesign-icons-react';
|
||||
import { IRouter } from '../index';
|
||||
|
||||
const settings: IRouter[] = [
|
||||
{
|
||||
path: '/settings',
|
||||
Component: lazy(() => import('pages/Settings')),
|
||||
meta: {
|
||||
title: '系统设置',
|
||||
Icon: SettingIcon,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
export default settings;
|
||||
Reference in New Issue
Block a user