1、前台/team-management加入申请的通过失败按钮增加一下图标,区分一下

2、前台/join-team页面上边要增加网站名称,要不然用户看不到是什么网站
3、后台/users的后台用户我新增一个,然后设置菜单权限,实际登陆没有生效
This commit is contained in:
2026-07-07 16:20:08 +08:00
parent b92dd75fd4
commit a0def59ece
9 changed files with 76 additions and 26 deletions
+43 -19
View File
@@ -3,10 +3,10 @@ import {
Button, Card, Result, Spin, Typography, Modal, message, Space,
} from 'antd';
import {
CheckCircleOutlined, TeamOutlined, LoginOutlined, UserAddOutlined,
CheckCircleOutlined, TeamOutlined, LoginOutlined, UserAddOutlined, ThunderboltOutlined,
} from '@ant-design/icons';
import { useNavigate, useSearchParams } from 'react-router-dom';
import { getJoinTeamInfo, getJoinTeamInfoPublic, submitJoinRequest } from '../api';
import { getJoinTeamInfo, getJoinTeamInfoPublic, submitJoinRequest, getSiteInfo } from '../api';
import type { JoinTeamInfo } from '../types';
import { useAuthStore } from '../store/useAuthStore';
@@ -21,9 +21,15 @@ const JoinTeamPage: React.FC = () => {
const [submitting, setSubmitting] = useState(false);
const [submitted, setSubmitted] = useState(false);
const [confirmModalOpen, setConfirmModalOpen] = useState(false);
const [siteName, setSiteName] = useState('VideoGen.AI');
const [siteLogo, setSiteLogo] = useState('');
useEffect(() => {
checkAuth();
getSiteInfo().then(info => {
setSiteName(info.siteName);
setSiteLogo(info.siteLogo);
}).catch(() => {});
}, [checkAuth]);
useEffect(() => {
@@ -146,22 +152,39 @@ const JoinTeamPage: React.FC = () => {
return (
<>
<div style={{ display: 'flex', justifyContent: 'center', padding: 40 }}>
<Card
variant="outlined"
style={{ borderRadius: 16, maxWidth: 480, width: '100%', textAlign: 'center' }}
>
<TeamOutlined style={{ fontSize: 48, color: '#6366f1', marginBottom: 16 }} />
<Typography.Title level={3}></Typography.Title>
<Typography.Text style={{ fontSize: 16, color: '#475569', display: 'block', marginBottom: 8 }}>
</Typography.Text>
<Typography.Title level={4} style={{ color: '#6366f1', margin: '16px 0 24px' }}>
{info.teamName}
</Typography.Title>
<Typography.Text type="secondary" style={{ display: 'block', marginBottom: 24 }}>
使
</Typography.Text>
<div style={{ display: 'flex', justifyContent: 'center', padding: '40px 20px' }}>
<div style={{ width: '100%', maxWidth: 480 }}>
{/* 网站名称 */}
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', gap: 12, marginBottom: 32 }}>
{siteLogo ? (
<img src={siteLogo} alt="logo" style={{ width: 40, height: 40, borderRadius: 10 }} />
) : (
<div style={{
width: 40, height: 40, borderRadius: 10,
background: 'linear-gradient(135deg, #6366f1, #8b5cf6)',
display: 'flex', alignItems: 'center', justifyContent: 'center',
}}>
<ThunderboltOutlined style={{ fontSize: 20, color: '#fff' }} />
</div>
)}
<span style={{ fontSize: 22, fontWeight: 700, color: '#1e293b', letterSpacing: 0.5 }}>{siteName}</span>
</div>
<Card
variant="outlined"
style={{ borderRadius: 16, width: '100%', textAlign: 'center' }}
>
<TeamOutlined style={{ fontSize: 48, color: '#6366f1', marginBottom: 16 }} />
<Typography.Title level={3}></Typography.Title>
<Typography.Text style={{ fontSize: 16, color: '#475569', display: 'block', marginBottom: 8 }}>
</Typography.Text>
<Typography.Title level={4} style={{ color: '#6366f1', margin: '16px 0 24px' }}>
{info.teamName}
</Typography.Title>
<Typography.Text type="secondary" style={{ display: 'block', marginBottom: 24 }}>
使
</Typography.Text>
{user ? (
<Button
@@ -197,7 +220,8 @@ const JoinTeamPage: React.FC = () => {
</Typography.Text>
</Space>
)}
</Card>
</Card>
</div>
</div>
<Modal
@@ -5,7 +5,7 @@ import {
import { DatePicker } from 'antd';
import dayjs from 'dayjs';
import {
CopyOutlined, DownloadOutlined, PlusOutlined, ReloadOutlined, UserOutlined, HistoryOutlined, WalletOutlined, BellOutlined, ClockCircleOutlined,
CopyOutlined, DownloadOutlined, PlusOutlined, ReloadOutlined, UserOutlined, HistoryOutlined, WalletOutlined, BellOutlined, ClockCircleOutlined, CheckOutlined, CloseOutlined,
} from '@ant-design/icons';
const { RangePicker } = DatePicker;
@@ -405,8 +405,8 @@ const TeamManagementPage: React.FC = () => {
title: '操作', key: 'action', width: 160,
render: (_: any, r: TeamJoinRequest) => (
<Space size={4}>
<Button size="small" type="link" style={{ color: '#16a34a', padding: 0 }} onClick={() => handleRequest(r.id, 'approve')}></Button>
<Button size="small" type="link" danger style={{ padding: 0 }} onClick={() => {
<Button size="small" type="link" icon={<CheckOutlined />} style={{ color: '#16a34a', padding: 0 }} onClick={() => handleRequest(r.id, 'approve')}></Button>
<Button size="small" type="link" icon={<CloseOutlined />} danger style={{ padding: 0 }} onClick={() => {
Modal.confirm({
title: '拒绝申请',
content: (