This commit is contained in:
2026-06-29 11:04:09 +08:00
parent d03f6b4368
commit 696172108b
11 changed files with 30 additions and 48 deletions
+1 -1
View File
@@ -361,7 +361,7 @@ export async function adminChangePassword(oldPwd: string, newPwd: string): Promi
await api.post('/admin/change-password', { old_password: oldPwd, new_password: newPwd });
}
export async function getSiteInfo(): Promise<{ siteName: string; siteLogo: string; userAgreementPrivacyUrl: string; siteCopyright: string }> {
export async function getSiteInfo(): Promise<{ siteName: string; siteLogo: string; userAgreementUrl: string; privacyPolicyUrl: string }> {
return api.get('/auth/site-info', false);
}
+5 -6
View File
@@ -84,9 +84,8 @@ const AdminSettings: React.FC = () => {
};
const groupedConfigs: Record<string, SystemConfig[]> = {
'站点信息': configs.filter(c => c.key.startsWith('site_') && c.key !== 'site_copyright'),
'协议配置': configs.filter(c => c.key === 'user_agreement_privacy_url'),
'版权信息': configs.filter(c => c.key === 'site_copyright'),
'站点信息': configs.filter(c => c.key.startsWith('site_')),
'协议配置': configs.filter(c => c.key === 'user_agreement_url' || c.key === 'privacy_policy_url'),
'SEO 设置': configs.filter(c => c.key.startsWith('seo_')),
'用户积分配置': configs.filter(c => c.key.startsWith('user_') && c.key.includes('credits')),
};
@@ -95,8 +94,8 @@ const AdminSettings: React.FC = () => {
const descMap: Record<string, string> = {
site_name: '平台显示名称,将展示在页面标题和导航栏',
site_logo: '平台Logo图片URL,建议尺寸 200x40px',
user_agreement_privacy_url: '用户注册/登录时需同意的用户协议及隐私政策PDF文件',
site_copyright: '网站底部显示的版权信息,例如:© 2024 民众智创 版权所有',
user_agreement_url: '用户注册/登录时需同意的用户协议PDF文件',
privacy_policy_url: '用户注册/登录时需同意的隐私政策PDF文件',
seo_title: '搜索引擎结果中显示的标题',
seo_description: '搜索引擎结果中显示的描述文字,建议150字以内',
seo_keywords: '用逗号分隔的关键词列表',
@@ -199,7 +198,7 @@ const AdminSettings: React.FC = () => {
};
const PdfUploadField: React.FC<{ config: SystemConfig }> = ({ config }) => {
const label = '用户协议及隐私政策';
const label = config.key === 'user_agreement_url' ? '用户协议' : '隐私政策';
const hasFile = config.value && config.value.startsWith('/uploads/');
return (
<div style={{