|
|
|
@ -32,6 +32,10 @@ function LogoHeader() { |
|
|
|
|
|
|
|
/* ===================== 子组件:身份卡片 ===================== */ |
|
|
|
|
|
|
|
/** |
|
|
|
* 身份卡片:两张卡视觉重量保持一致(统一白底描边图标 + 主色线框), |
|
|
|
* 仅通过选中态的主题色底与描边区分,避免蓝/绿双色造成的重量不均衡。 |
|
|
|
*/ |
|
|
|
function IdentityCard({ |
|
|
|
option, |
|
|
|
selected, |
|
|
|
@ -41,7 +45,6 @@ function IdentityCard({ |
|
|
|
selected: boolean; |
|
|
|
onSelect: () => void; |
|
|
|
}) { |
|
|
|
const isCandidate = option.role === 'candidate'; |
|
|
|
return ( |
|
|
|
<Pressable |
|
|
|
style={[styles.card, selected && styles.cardSelected]} |
|
|
|
@ -51,14 +54,14 @@ function IdentityCard({ |
|
|
|
<View |
|
|
|
style={[ |
|
|
|
styles.iconWrap, |
|
|
|
{ backgroundColor: isCandidate ? colors.primaryLight : colors.successLight }, |
|
|
|
selected && { backgroundColor: isCandidate ? colors.primary : colors.success }, |
|
|
|
{ backgroundColor: selected ? colors.primaryLight : colors.white }, |
|
|
|
selected && { borderColor: colors.primaryBorder }, |
|
|
|
]} |
|
|
|
> |
|
|
|
<Ionicons |
|
|
|
name={option.icon as keyof typeof Ionicons.glyphMap} |
|
|
|
size={28} |
|
|
|
color={selected ? colors.textInverse : isCandidate ? colors.primary : colors.success} |
|
|
|
color={colors.primary} |
|
|
|
/> |
|
|
|
</View> |
|
|
|
<Text style={[styles.cardTitle, selected && styles.cardTitleSelected]}>{option.title}</Text> |
|
|
|
@ -124,7 +127,7 @@ export default function IdentitySelectScreen() { |
|
|
|
}; |
|
|
|
|
|
|
|
return ( |
|
|
|
<SafeAreaView style={styles.container} edges={['top']}> |
|
|
|
<SafeAreaView style={styles.container} edges={['bottom']}> |
|
|
|
<ScrollView contentContainerStyle={styles.body} showsVerticalScrollIndicator={false}> |
|
|
|
<LogoHeader /> |
|
|
|
|
|
|
|
@ -145,22 +148,18 @@ export default function IdentitySelectScreen() { |
|
|
|
))} |
|
|
|
</View> |
|
|
|
|
|
|
|
<Text style={styles.hint}>点击上方身份卡片,立即进入对应端</Text> |
|
|
|
<Text style={styles.hint}>点击上方卡片,进入对应身份页面</Text> |
|
|
|
<Text style={styles.switchTip}>身份后续可在设置中切换</Text> |
|
|
|
</> |
|
|
|
)} |
|
|
|
</ScrollView> |
|
|
|
|
|
|
|
<Pressable style={styles.manageLink} onPress={() => router.push('/operation-rules')}> |
|
|
|
<Ionicons name="settings-outline" size={14} color={colors.textHint} /> |
|
|
|
<Text style={styles.manageText}>管理规则 / 风控审计</Text> |
|
|
|
</Pressable> |
|
|
|
</SafeAreaView> |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
const styles = StyleSheet.create({ |
|
|
|
container: { flex: 1, backgroundColor: colors.pageBg }, |
|
|
|
body: { flexGrow: 1, padding: 20, paddingTop: 40 }, |
|
|
|
body: { flexGrow: 1, padding: 20, paddingTop: 28 }, |
|
|
|
logoHeader: { alignItems: 'center', marginBottom: 32 }, |
|
|
|
logoCircle: { |
|
|
|
width: 72, |
|
|
|
@ -174,7 +173,7 @@ const styles = StyleSheet.create({ |
|
|
|
logoText: { fontSize: 32, fontWeight: '800', color: colors.textInverse }, |
|
|
|
brandName: { fontSize: 24, fontWeight: '800', color: colors.textPrimary }, |
|
|
|
brandSlogan: { fontSize: 13, color: colors.textSecondary, marginTop: 6 }, |
|
|
|
cards: { flexDirection: 'row', gap: 12, marginBottom: 24 }, |
|
|
|
cards: { flexDirection: 'row', gap: 16, marginBottom: 20 }, |
|
|
|
card: { |
|
|
|
flex: 1, |
|
|
|
position: 'relative', |
|
|
|
@ -192,6 +191,8 @@ const styles = StyleSheet.create({ |
|
|
|
alignItems: 'center', |
|
|
|
justifyContent: 'center', |
|
|
|
marginBottom: 12, |
|
|
|
borderWidth: 1, |
|
|
|
borderColor: colors.borderLight, |
|
|
|
}, |
|
|
|
cardTitle: { fontSize: 16, fontWeight: '700', color: colors.textPrimary }, |
|
|
|
cardTitleSelected: { color: colors.primaryText }, |
|
|
|
@ -203,13 +204,12 @@ const styles = StyleSheet.create({ |
|
|
|
color: colors.textHint, |
|
|
|
textAlign: 'center', |
|
|
|
}, |
|
|
|
manageLink: { |
|
|
|
flexDirection: 'row', |
|
|
|
alignItems: 'center', |
|
|
|
justifyContent: 'center', |
|
|
|
paddingVertical: 16, |
|
|
|
switchTip: { |
|
|
|
marginTop: 6, |
|
|
|
fontSize: 12, |
|
|
|
color: colors.textHint, |
|
|
|
textAlign: 'center', |
|
|
|
}, |
|
|
|
manageText: { marginLeft: 6, fontSize: 13, color: colors.textHint }, |
|
|
|
center: { flex: 1, alignItems: 'center', justifyContent: 'center', paddingHorizontal: 40, gap: 12 }, |
|
|
|
tip: { fontSize: 14, color: colors.textSecondary }, |
|
|
|
retryBtn: { paddingHorizontal: 18, paddingVertical: 8, borderRadius: 16, backgroundColor: colors.primaryLight }, |
|
|
|
|