Files
frontend/src/screens/profile/PrivacyPolicyScreen.tsx

317 lines
13 KiB
TypeScript
Raw Normal View History

/**
* PrivacyPolicyScreen
* -
*
*/
import React, { useMemo } from 'react';
import {
View,
StyleSheet,
ScrollView,
} from 'react-native';
import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context';
import {
useAppColors,
spacing,
type AppColors,
} from '../../theme';
import { Text } from '../../components/common';
import { useResponsive, useResponsiveSpacing } from '../../hooks';
// 内容最大宽度
const CONTENT_MAX_WIDTH = 400;
// 威友橙主题色
const THEME_COLORS = {
primary: '#FF6B35',
};
// 政策最后更新日期
const LAST_UPDATED = '2026年4月4日';
// 隐私政策内容
const PRIVACY_SECTIONS = [
{
title: '引言',
content: `威友(以下简称"我们"或"本应用")非常重视用户的隐私和个人信息保护。我们深知个人信息对您的重要性,并会尽全力保护您的个人信息安全可靠。
使使
使使`,
},
{
title: '一、我们收集的信息',
content: `1.1 您主动提供的信息
使
1.2 使
IMEIAndroid IDIDFAOAIDMAC地址等IP地址等
IP地址访
/
`,
},
{
title: '二、我们如何使用信息',
content: `2.1 我们使用收集的信息用于以下目的:
2.2 使Cookie和同类技术
使Cookie和同类技术Web BeaconPixel标签使
使
使
广
Cookie用于本政策所述目的之外的任何用途Cookie使`,
},
{
title: '三、信息的共享与披露',
content: `3.1 我们不会将您的个人信息出售给任何第三方,但在以下情况下可能会共享或披露您的信息:
3.2
3.3
3.4
使
3.5
1
2
3
4
5
6
7
8
9
3.6
使使`,
},
{
title: '四、信息的存储与保护',
content: `4.1 信息存储
使
4.2
使
访访
4.3
`,
},
{
title: '五、您的权利',
content: `5.1 访问和更正
访"设置"-"编辑资料"
5.2
使
使
5.3
使使
5.4
"设置"-"账号安全"6
5.5
system@qczlit.cn`,
},
{
title: '六、未成年人保护',
content: `6.1 我们非常重视对未成年人个人信息的保护。我们的服务主要面向大学生及成年用户。
6.2 18使使
6.3 使
6.4 `,
},
{
title: '七、第三方SDK目录',
content: `为了保障App的稳定运行或实现特定功能我们可能接入第三方SDK。截至本隐私政策更新之日我们主要使用以下服务
Expo推送服务
SDKSDK收集的信息类型和用途SDK目录将在应用内公布`,
},
{
title: '八、隐私政策的更新',
content: `8.1 我们可能会不时更新本隐私政策。更新后的隐私政策将在应用内公布,并标注更新日期。
8.2
8.3 使使`,
},
{
title: '九、联系我们',
content: `如果您对本隐私政策有任何疑问、意见或建议,或者您希望行使您的权利,请通过以下方式与我们联系:
system@qczlit.cn
15`,
},
];
function createPrivacyStyles(colors: AppColors) {
return StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
},
scrollContent: {
paddingHorizontal: 28,
paddingTop: 24,
},
// 内容区域
content: {
maxWidth: CONTENT_MAX_WIDTH,
alignSelf: 'center',
width: '100%',
},
// 更新日期
lastUpdated: {
fontSize: 13,
color: colors.text.hint,
marginBottom: 20,
},
// 重点提示框
highlightBox: {
backgroundColor: '#FFF5F0',
borderRadius: 12,
padding: 16,
marginBottom: 20,
borderLeftWidth: 4,
borderLeftColor: THEME_COLORS.primary,
},
highlightTitle: {
fontSize: 15,
fontWeight: '600',
color: THEME_COLORS.primary,
marginBottom: 8,
},
highlightText: {
fontSize: 14,
lineHeight: 22,
color: colors.text.secondary,
},
// 隐私政策内容卡片
privacyCard: {
backgroundColor: '#F5F5F7',
borderRadius: 16,
padding: 20,
marginBottom: 24,
},
section: {
marginBottom: 24,
},
sectionLast: {
marginBottom: 0,
},
sectionTitle: {
fontSize: 16,
fontWeight: '600',
color: THEME_COLORS.primary,
marginBottom: 12,
},
sectionContent: {
fontSize: 14,
lineHeight: 24,
color: colors.text.primary,
},
// 底部版权
footer: {
alignItems: 'center',
},
footerText: {
fontSize: 13,
color: colors.text.hint,
textAlign: 'center',
marginBottom: 4,
},
});
}
export const PrivacyPolicyScreen: React.FC = () => {
const colors = useAppColors();
const styles = useMemo(() => createPrivacyStyles(colors), [colors]);
const insets = useSafeAreaInsets();
const { isMobile } = useResponsive();
const responsivePadding = useResponsiveSpacing({ xs: 20, sm: 24, md: 28, lg: 32, xl: 40 });
// 底部间距,避免被 TabBar 遮挡
const scrollBottomInset = isMobile ? 64 + 24 + insets.bottom + spacing.md : spacing.lg;
return (
<SafeAreaView style={styles.container} edges={['bottom']}>
<ScrollView
contentContainerStyle={[styles.scrollContent, { paddingHorizontal: responsivePadding, paddingBottom: scrollBottomInset }]}
showsVerticalScrollIndicator={false}
>
<View style={styles.content}>
{/* 更新日期 */}
<Text style={styles.lastUpdated}>{LAST_UPDATED}</Text>
{/* 重点提示 */}
<View style={styles.highlightBox}>
<Text style={styles.highlightTitle}></Text>
<Text style={styles.highlightText}>
</Text>
</View>
{/* 隐私政策内容 */}
<View style={styles.privacyCard}>
{PRIVACY_SECTIONS.map((section, index) => (
<View key={index} style={[styles.section, index === PRIVACY_SECTIONS.length - 1 && styles.sectionLast]}>
<Text style={styles.sectionTitle}>{section.title}</Text>
<Text style={styles.sectionContent}>{section.content}</Text>
</View>
))}
</View>
{/* 底部版权 */}
<View style={styles.footer}>
<Text style={styles.footerText}>© 2026 </Text>
</View>
</View>
</ScrollView>
</SafeAreaView>
);
};
export default PrivacyPolicyScreen;