Browse Source

fix(ui): 清理页面空交互,接真实逻辑与 Alert 兜底

- settings.tsx:退出登录按钮接 useAuth().logout() + 确认弹窗 + 跳登录页(修复登出失效)
- jobs/[id].tsx:「加入对比」接真实路由 /jobs/compare;分享/评分说明/发布评论接 Alert 兜底
- profile.tsx:「编辑」与偏好行接真实路由 /job-preference;「评分申诉」Alert 兜底
- chat/[id].tsx:面试/薪资卡片动作与输入框图标、加号按钮接 Alert 兜底
- job-management.tsx:筛选/排序/编辑/刷新/下架接 Alert 兜底
- login.tsx:微信/Apple 第三方登录占位接 Alert 兜底
- personal-data-export.tsx:导出下载与查看更多接 Alert 兜底
- salary-calculator.tsx:历史记录/城市选择/保存接 Alert 兜底
- settings/privacy.tsx:查看隐私报告接 Alert 兜底
- settings/account-cancel.tsx:注销前待办「去处理」接 Alert 兜底
(跳过 jobs.tsx 弹层内 filterPanel 空 onPress:属故意吸收点击防关闭弹窗)
master
doublex001 2 months ago
parent
commit
6637c0ef8c
  1. 11
      app/(enterprise)/job-management.tsx
  2. 7
      app/(tabs)/profile.tsx
  3. 13
      app/chat/[id].tsx
  4. 11
      app/jobs/[id].tsx
  5. 5
      app/login.tsx
  6. 5
      app/personal-data-export.tsx
  7. 20
      app/settings.tsx
  8. 3
      app/settings/account-cancel.tsx
  9. 4
      app/settings/privacy.tsx
  10. 7
      app/tools/salary-calculator.tsx

11
app/(enterprise)/job-management.tsx

@ -3,6 +3,7 @@ import { useRouter } from 'expo-router';
import { useMemo, useState } from 'react';
import {
ActivityIndicator,
Alert,
Pressable,
ScrollView,
StyleSheet,
@ -117,11 +118,11 @@ function SearchFilterBar() {
placeholderTextColor={colors.textHint}
/>
</View>
<Pressable style={styles.filterBtn} onPress={() => {}}>
<Pressable style={styles.filterBtn} onPress={() => Alert.alert('筛选', '岗位筛选功能开发中,敬请期待')}>
<Ionicons name="funnel-outline" size={18} color={colors.textPrimary} />
<Text style={styles.filterBtnText}>筛选</Text>
</Pressable>
<Pressable style={styles.sortBtn} onPress={() => {}}>
<Pressable style={styles.sortBtn} onPress={() => Alert.alert('排序', '岗位排序功能开发中,敬请期待')}>
<Text style={styles.sortBtnText}>最新发布</Text>
<Ionicons name="chevron-down" size={14} color={colors.textHint} />
</Pressable>
@ -178,15 +179,15 @@ function JobCard({ job }: { job: JobManagementJob }) {
</View>
<View style={styles.jobActions}>
<Pressable style={styles.jobActionBtn} onPress={() => {}}>
<Pressable style={styles.jobActionBtn} onPress={() => Alert.alert('提示', '功能开发中,敬请期待')}>
<Ionicons name="create-outline" size={16} color={colors.primary} />
<Text style={styles.jobActionText}>编辑</Text>
</Pressable>
<Pressable style={styles.jobActionBtn} onPress={() => {}}>
<Pressable style={styles.jobActionBtn} onPress={() => Alert.alert('提示', '功能开发中,敬请期待')}>
<Ionicons name="refresh-outline" size={16} color={colors.primary} />
<Text style={styles.jobActionText}>刷新</Text>
</Pressable>
<Pressable style={styles.jobActionBtn} onPress={() => {}}>
<Pressable style={styles.jobActionBtn} onPress={() => Alert.alert('提示', '功能开发中,敬请期待')}>
<Ionicons name="download-outline" size={16} color={colors.primary} />
<Text style={styles.jobActionText}>下架</Text>
</Pressable>

7
app/(tabs)/profile.tsx

@ -3,6 +3,7 @@ import { LinearGradient } from 'expo-linear-gradient';
import { useRouter } from 'expo-router';
import {
ActivityIndicator,
Alert,
Pressable,
ScrollView,
StyleSheet,
@ -271,7 +272,7 @@ export default function ProfileScreen() {
<View style={styles.sectionHeader}>
<View style={styles.sectionBar} />
<Text style={[styles.sectionTitle, styles.sectionTitleGrow]}>八大维度评分</Text>
<Pressable onPress={() => {}} hitSlop={6}>
<Pressable onPress={() => Alert.alert('评分申诉', '评分申诉功能开发中,敬请期待')} hitSlop={6}>
<Text style={styles.sectionLink}>评分申诉</Text>
</Pressable>
</View>
@ -285,7 +286,7 @@ export default function ProfileScreen() {
<View style={styles.sectionHeader}>
<View style={styles.sectionBar} />
<Text style={[styles.sectionTitle, styles.sectionTitleGrow]}>求职偏好</Text>
<Pressable onPress={() => {}} hitSlop={6}>
<Pressable onPress={() => router.push('/job-preference')} hitSlop={6}>
<Text style={styles.sectionLink}>编辑</Text>
</Pressable>
</View>
@ -298,7 +299,7 @@ export default function ProfileScreen() {
<Pressable
key={key}
style={[styles.prefRow, isLast && styles.prefRowLast]}
onPress={() => {}}
onPress={() => router.push('/job-preference')}
>
<Text style={styles.prefLabel}>{label}</Text>
{isStatus ? (

13
app/chat/[id].tsx

@ -3,6 +3,7 @@ import { useLocalSearchParams, useRouter } from 'expo-router';
import { useCallback, useMemo, useRef, useState } from 'react';
import {
ActivityIndicator,
Alert,
KeyboardAvoidingView,
Platform,
Pressable,
@ -148,7 +149,7 @@ function InterviewCard({ card }: { card: ChatCard }) {
</View>
))}
</View>
<Pressable style={styles.cardAction} onPress={() => {}}>
<Pressable style={styles.cardAction} onPress={() => Alert.alert('提示', '功能开发中,敬请期待')}>
<Text style={styles.cardActionText}>{card.actionText}</Text>
<Ionicons name="chevron-forward" size={14} color={colors.primary} />
</Pressable>
@ -166,7 +167,7 @@ function SalaryCard({ card }: { card: ChatCard }) {
{card.subtitle && (
<Text style={styles.cardSubtitle}>{card.subtitle}</Text>
)}
<Pressable style={styles.cardAction} onPress={() => {}}>
<Pressable style={styles.cardAction} onPress={() => Alert.alert('提示', '功能开发中,敬请期待')}>
<Text style={styles.cardActionText}>{card.actionText}</Text>
<Ionicons name="chevron-forward" size={14} color={colors.primary} />
</Pressable>
@ -266,13 +267,13 @@ function InputBar({
return (
<View style={styles.inputBar}>
<View style={styles.inputLeftActions}>
<Pressable style={styles.inputIconBtn} onPress={() => {}}>
<Pressable style={styles.inputIconBtn} onPress={() => Alert.alert('提示', '功能开发中,敬请期待')}>
<Ionicons name="happy-outline" size={24} color={colors.textSecondary} />
</Pressable>
<Pressable style={styles.inputIconBtn} onPress={() => {}}>
<Pressable style={styles.inputIconBtn} onPress={() => Alert.alert('提示', '功能开发中,敬请期待')}>
<Ionicons name="image-outline" size={24} color={colors.textSecondary} />
</Pressable>
<Pressable style={styles.inputIconBtn} onPress={() => {}}>
<Pressable style={styles.inputIconBtn} onPress={() => Alert.alert('提示', '功能开发中,敬请期待')}>
<Ionicons name="folder-outline" size={24} color={colors.textSecondary} />
</Pressable>
</View>
@ -288,7 +289,7 @@ function InputBar({
maxLength={500}
editable={!sending}
/>
<Pressable style={styles.plusBtn} onPress={() => {}}>
<Pressable style={styles.plusBtn} onPress={() => Alert.alert('提示', '功能开发中,敬请期待')}>
<Ionicons name="add" size={22} color={colors.textSecondary} />
</Pressable>
</View>

11
app/jobs/[id].tsx

@ -3,6 +3,7 @@ import { useLocalSearchParams, useRouter } from 'expo-router';
import { useState } from 'react';
import {
ActivityIndicator,
Alert,
Pressable,
ScrollView,
StyleSheet,
@ -112,7 +113,7 @@ function Header({ onBack }: { onBack: () => void }) {
<Ionicons name="chevron-back" size={24} color={colors.textPrimary} />
</Pressable>
<Text style={styles.headerTitle}>岗位详情</Text>
<Pressable style={styles.headerBtn} onPress={() => {}} hitSlop={8}>
<Pressable style={styles.headerBtn} onPress={() => Alert.alert('分享', '分享功能开发中,敬请期待')} hitSlop={8}>
<Ionicons name="share-social-outline" size={22} color={colors.textPrimary} />
</Pressable>
</View>
@ -216,7 +217,7 @@ export default function JobDetailScreen() {
</View>
{/* 2. 岗位综合评分 */}
<SectionTitle title="岗位综合评分" link="评分说明" onLink={() => {}} />
<SectionTitle title="岗位综合评分" link="评分说明" onLink={() => Alert.alert('评分说明', '评分规则说明开发中,敬请期待')} />
<View style={styles.card}>
<View style={styles.scoreRow}>
<RadarChart dimensions={overallScore.dimensions} />
@ -231,14 +232,14 @@ export default function JobDetailScreen() {
<Text style={styles.scoreRank}>{overallScore.rank}</Text>
</View>
</View>
<Pressable style={styles.compareBtn} onPress={() => {}} hitSlop={6}>
<Pressable style={styles.compareBtn} onPress={() => router.push('/jobs/compare')} hitSlop={6}>
<Ionicons name="add-circle-outline" size={16} color={colors.primary} />
<Text style={styles.compareText}>加入对比</Text>
</Pressable>
</View>
{/* 3. 真实薪资区间 */}
<SectionTitle title="真实薪资区间" link="全部" onLink={() => {}} />
<SectionTitle title="真实薪资区间" link="全部" onLink={() => Alert.alert('薪资详情', '完整薪资数据开发中,敬请期待')} />
<View style={styles.card}>
{salaryData.ranges.map((range, index) => (
<View
@ -284,7 +285,7 @@ export default function JobDetailScreen() {
value={comment}
onChangeText={setComment}
/>
<Pressable style={styles.publishBtn} onPress={() => {}}>
<Pressable style={styles.publishBtn} onPress={() => Alert.alert('发布评论', '评论发布功能开发中,敬请期待')}>
<Text style={styles.publishText}>发布</Text>
</Pressable>
</View>

5
app/login.tsx

@ -3,6 +3,7 @@ import { LinearGradient } from 'expo-linear-gradient';
import { useRouter } from 'expo-router';
import { useEffect, useRef, useState } from 'react';
import {
Alert,
Pressable,
ScrollView,
StyleSheet,
@ -147,10 +148,10 @@ export default function LoginScreen() {
<View style={styles.others}>
<Text style={styles.othersTitle}>其他登录方式</Text>
<View style={styles.othersRow}>
<Pressable style={styles.otherItem} onPress={() => {}} hitSlop={8}>
<Pressable style={styles.otherItem} onPress={() => Alert.alert('提示', '该功能开发中,敬请期待')} hitSlop={8}>
<Ionicons name="logo-wechat" size={26} color={colors.success} />
</Pressable>
<Pressable style={styles.otherItem} onPress={() => {}} hitSlop={8}>
<Pressable style={styles.otherItem} onPress={() => Alert.alert('提示', '该功能开发中,敬请期待')} hitSlop={8}>
<Ionicons name="logo-apple" size={26} color={colors.textPrimary} />
</Pressable>
</View>

5
app/personal-data-export.tsx

@ -2,6 +2,7 @@ import { Ionicons } from '@expo/vector-icons';
import { useRouter } from 'expo-router';
import { useMemo, useState } from 'react';
import {
Alert,
ActivityIndicator,
Pressable,
ScrollView,
@ -346,11 +347,11 @@ export default function PersonalDataExportScreen() {
const isLast = index === exportData.recentExports.length - 1;
return (
<View key={record.id} style={isLast ? undefined : styles.rowBorder}>
<RecentExportRow record={record} onDownload={() => {}} />
<RecentExportRow record={record} onDownload={() => Alert.alert('下载', '导出文件下载功能开发中,敬请期待')} />
</View>
);
})}
<Pressable style={styles.viewMoreRow} onPress={() => {}}>
<Pressable style={styles.viewMoreRow} onPress={() => Alert.alert('提示', '历史导出功能开发中,敬请期待')}>
<Text style={styles.viewMoreText}>查看更多历史导出</Text>
<Ionicons name="chevron-forward" size={16} color={colors.textHint} />
</Pressable>

20
app/settings.tsx

@ -1,8 +1,9 @@
import { Ionicons } from '@expo/vector-icons';
import { useRouter } from 'expo-router';
import { Pressable, ScrollView, StyleSheet, Text, View } from 'react-native';
import { Alert, Pressable, ScrollView, StyleSheet, Text, View } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { colors } from '../src/theme';
import { useAuth } from '../src/context/AuthContext';
/* ===================== 设置项结构 ===================== */
@ -90,6 +91,21 @@ function Header({ onBack }: { onBack: () => void }) {
export default function SettingsScreen() {
const router = useRouter();
const { logout } = useAuth();
const handleLogout = () => {
Alert.alert('确认退出登录', '退出后需要重新登录', [
{ text: '取消', style: 'cancel' },
{
text: '退出',
style: 'destructive',
onPress: () => {
logout();
router.replace('/login');
},
},
]);
};
const handlePress = (item: SettingsItem) => {
if (item.route) {
@ -134,7 +150,7 @@ export default function SettingsScreen() {
))}
{/* 退出登录 */}
<Pressable style={styles.logoutBtn} onPress={() => {}}>
<Pressable style={styles.logoutBtn} onPress={handleLogout}>
<Text style={styles.logoutText}>退出登录</Text>
</Pressable>
</ScrollView>

3
app/settings/account-cancel.tsx

@ -2,6 +2,7 @@ import { useState } from 'react';
import { Ionicons } from '@expo/vector-icons';
import { useRouter } from 'expo-router';
import {
Alert,
ActivityIndicator,
Pressable,
ScrollView,
@ -128,7 +129,7 @@ export default function AccountCancelScreen() {
<View style={styles.rowBody}>
<Text style={styles.rowTitle}>{item.label}</Text>
{item.actionText ? (
<Pressable onPress={() => {}}>
<Pressable onPress={() => Alert.alert('提示', '该待办处理功能开发中,敬请期待')}>
<Text style={styles.actionText}>{item.actionText}</Text>
</Pressable>
) : null}

4
app/settings/privacy.tsx

@ -1,6 +1,6 @@
import { Ionicons } from '@expo/vector-icons';
import { useRouter } from 'expo-router';
import { Pressable, ScrollView, StyleSheet, Switch, Text, View } from 'react-native';
import { Alert, Pressable, ScrollView, StyleSheet, Switch, Text, View } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { usePrivacyCenter } from '../../src/hooks';
import { ErrorState, LoadingState } from '../../src/components/StateView';
@ -41,7 +41,7 @@ function PrivacyLevelCard({ level }: { level: PrivacyLevelInfo }) {
<Text style={styles.levelDesc}>{level.description}</Text>
</View>
</View>
<Pressable style={styles.levelBtn} onPress={() => {}}>
<Pressable style={styles.levelBtn} onPress={() => Alert.alert('隐私报告', '隐私报告功能开发中,敬请期待')}>
<Text style={[styles.levelBtnText, { color: theme.text }]}>查看隐私报告</Text>
<Ionicons name="chevron-forward" size={14} color={theme.text} />
</Pressable>

7
app/tools/salary-calculator.tsx

@ -3,6 +3,7 @@ import { LinearGradient } from 'expo-linear-gradient';
import { useRouter } from 'expo-router';
import { useState } from 'react';
import {
Alert,
Pressable,
ScrollView,
StyleSheet,
@ -232,7 +233,7 @@ export default function SalaryCalculatorScreen() {
return (
<SafeAreaView style={styles.container} edges={['top']}>
<Header onBack={() => router.back()} onHistory={() => {}} />
<Header onBack={() => router.back()} onHistory={() => Alert.alert('历史记录', '计算历史功能开发中,敬请期待')} />
<ScrollView contentContainerStyle={styles.body} showsVerticalScrollIndicator={false}>
{/* 输入卡片 */}
<View style={styles.card}>
@ -243,7 +244,7 @@ export default function SalaryCalculatorScreen() {
suffix="元"
onChange={(v) => update('monthlyGross', Math.max(0, v))}
/>
<SelectRow label="所在城市" value={inputs.city} onPress={() => {}} />
<SelectRow label="所在城市" value={inputs.city} onPress={() => Alert.alert('选择城市', '城市选择功能开发中,敬请期待')} />
<NumberInput
label="社保基数"
value={inputs.socialBase}
@ -315,7 +316,7 @@ export default function SalaryCalculatorScreen() {
))}
</View>
<Pressable style={styles.saveBtn} onPress={() => {}}>
<Pressable style={styles.saveBtn} onPress={() => Alert.alert('保存计算记录', '保存功能开发中,敬请期待')}>
<Text style={styles.saveBtnText}>保存计算记录</Text>
</Pressable>
</ScrollView>

Loading…
Cancel
Save