1、前台登陆的《用户协议》和《隐私政策》合并为一个文件,用户协议及隐私政策,后台系统设置上传同步更改

2、前台登陆最下方加入版权信息添加,后台系统设置同步修改
This commit is contained in:
2026-06-29 10:42:13 +08:00
parent 92fb64aa99
commit 776e122adf
10 changed files with 96 additions and 64 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; userAgreementUrl: string; privacyPolicyUrl: string }> {
export async function getSiteInfo(): Promise<{ siteName: string; siteLogo: string; userAgreementPrivacyUrl: string; siteCopyright: string }> {
return api.get('/auth/site-info', false);
}
+6 -5
View File
@@ -84,8 +84,9 @@ const AdminSettings: React.FC = () => {
};
const groupedConfigs: Record<string, SystemConfig[]> = {
'站点信息': configs.filter(c => c.key.startsWith('site_')),
'协议配置': configs.filter(c => c.key === 'user_agreement_url' || c.key === 'privacy_policy_url'),
'站点信息': 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'),
'SEO 设置': configs.filter(c => c.key.startsWith('seo_')),
'用户积分配置': configs.filter(c => c.key.startsWith('user_') && c.key.includes('credits')),
};
@@ -94,8 +95,8 @@ const AdminSettings: React.FC = () => {
const descMap: Record<string, string> = {
site_name: '平台显示名称,将展示在页面标题和导航栏',
site_logo: '平台Logo图片URL,建议尺寸 200x40px',
user_agreement_url: '用户注册/登录时需同意的用户协议PDF文件',
privacy_policy_url: '用户注册/登录时需同意的隐私政策PDF文件',
user_agreement_privacy_url: '用户注册/登录时需同意的用户协议及隐私政策PDF文件',
site_copyright: '网站底部显示的版权信息,例如:© 2024 民众智创 版权所有',
seo_title: '搜索引擎结果中显示的标题',
seo_description: '搜索引擎结果中显示的描述文字,建议150字以内',
seo_keywords: '用逗号分隔的关键词列表',
@@ -198,7 +199,7 @@ const AdminSettings: React.FC = () => {
};
const PdfUploadField: React.FC<{ config: SystemConfig }> = ({ config }) => {
const label = config.key === 'user_agreement_url' ? '用户协议' : '隐私政策';
const label = '用户协议及隐私政策';
const hasFile = config.value && config.value.startsWith('/uploads/');
return (
<div style={{