import { Ionicons } from '@expo/vector-icons'; import { GlassView, isLiquidGlassAvailable } from 'expo-glass-effect'; import { Image } from 'expo-image'; import { LinearGradient } from 'expo-linear-gradient'; import React from 'react'; import { Dimensions, Modal, ScrollView, StyleSheet, Text, TouchableOpacity, View, } from 'react-native'; const { width: SCREEN_WIDTH } = Dimensions.get('window'); interface MedicationPhotoGuideModalProps { visible: boolean; onClose: () => void; } /** * 药品拍摄指南弹窗组件 * 展示如何正确拍摄药品照片的说明和示例 */ export function MedicationPhotoGuideModal({ visible, onClose }: MedicationPhotoGuideModalProps) { return ( e.stopPropagation()} style={styles.guideModalContainer} > {/* 标题部分 */} 规范 拍摄图片清晰 {/* 示例图片 */} {/* 正确示例 */} {/* 错误示例 */} {/* 说明文字 */} 请拍摄药品正面\背面的产品名称\说明部分。 注意拍摄时光线充分,没有反光,文字部分清晰可见。照片的清晰度会影响识别的准确率。 {/* 确认按钮 */} {isLiquidGlassAvailable() ? ( 知道了! ) : ( 知道了! )} ); } const styles = StyleSheet.create({ modalOverlay: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: 'rgba(0, 0, 0, 0.5)', }, guideModalContainer: { width: SCREEN_WIDTH - 48, maxHeight: '80%', backgroundColor: '#FFFFFF', borderRadius: 24, overflow: 'hidden', shadowColor: '#000', shadowOpacity: 0.25, shadowRadius: 20, shadowOffset: { width: 0, height: 10 }, elevation: 10, }, guideModalContent: { padding: 24, }, guideHeader: { alignItems: 'center', marginBottom: 24, }, guideStepBadge: { fontSize: 16, fontWeight: '700', color: '#FFB300', marginBottom: 8, }, guideTitle: { fontSize: 22, fontWeight: '700', color: '#0f172a', textAlign: 'center', }, guideImagesContainer: { flexDirection: 'row', justifyContent: 'space-between', marginBottom: 24, gap: 12, }, guideImageWrapper: { flex: 1, alignItems: 'center', }, guideImageBox: { width: '100%', aspectRatio: 1, borderRadius: 16, overflow: 'hidden', backgroundColor: '#f8fafc', position: 'relative', borderWidth: 2, borderColor: '#4CAF50', }, guideImageBoxBlur: { borderColor: '#F44336', }, guideImage: { width: '100%', height: '100%', }, guideImageIcon: { position: 'absolute', top: 8, left: 8, zIndex: 1, }, guideImageIndicator: { marginTop: 12, flexDirection: 'row', alignItems: 'center', justifyContent: 'center', backgroundColor: 'rgba(76, 175, 80, 0.1)', paddingHorizontal: 12, paddingVertical: 6, borderRadius: 12, }, guideImageIndicatorError: { backgroundColor: 'rgba(244, 67, 54, 0.1)', }, guideDescription: { backgroundColor: '#f8fafc', borderRadius: 16, padding: 16, marginBottom: 24, }, guideDescriptionText: { fontSize: 14, lineHeight: 22, color: '#475569', marginBottom: 8, }, guideConfirmButton: { borderRadius: 16, overflow: 'hidden', shadowColor: '#FFB300', shadowOpacity: 0.3, shadowRadius: 12, shadowOffset: { width: 0, height: 6 }, elevation: 6, }, guideConfirmButtonGradient: { paddingVertical: 16, alignItems: 'center', justifyContent: 'center', }, guideConfirmButtonText: { fontSize: 18, fontWeight: '700', color: '#FFFFFF', }, });