import { useState, useEffect } from "react"; import { useNavigate } from "react-router"; import { motion } from "motion/react"; import { ChevronLeft, UserCheck, Star, Clock, MessageCircle, Video, FileText, Award, ThumbsUp, ChevronRight, Loader2, } from "lucide-react"; import { Button } from "../components/ui/button"; import { Card } from "../components/ui/card"; import { Badge } from "../components/ui/badge"; import { getExperts, type Doctor as DoctorDTO } from "../services/api"; interface Doctor { id: string; name: string; title: string; hospital: string; specialty: string; experience: string; rating: number; reviewCount: number; consultCount: number; responseTime: string; price: number; avatar: string; tags: string[]; } export function ExpertConsultationPage() { const navigate = useNavigate(); const [selectedService, setSelectedService] = useState("text"); const [doctors, setDoctors] = useState([]); const [loading, setLoading] = useState(true); useEffect(() => { getExperts() .then((data) => { setDoctors( data.doctors.map((d) => ({ id: d.id, name: d.name, title: d.title, hospital: d.hospital, specialty: d.specialty, experience: d.experience, rating: d.rating, reviewCount: d.review_count, consultCount: d.consult_count, responseTime: d.response_time, price: d.price?.text || 50, avatar: "", tags: d.tags, })) ); }) .catch(() => {/* keep empty */}) .finally(() => setLoading(false)); }, []); const services = [ { id: "text", name: "图文咨询", icon: MessageCircle, price: 50, time: "24小时内回复", description: "上传报告,医生详细解读", }, { id: "video", name: "视频问诊", icon: Video, price: 200, time: "预约时间", description: "面对面沟通,更加详细", }, { id: "urgent", name: "加急咨询", icon: Clock, price: 100, time: "2小时内回复", description: "紧急情况,优先处理", }, ]; if (loading) { return (
); } return (
{/* 顶部导航 */}

专家复核

专业医生在线解答

{/* 服务介绍 */}

👨‍⚕️ 为什么需要专家复核

✓ AI解读仅供参考,复杂情况需专业医生判断

✓ 三甲医院主任医师,20年+临床经验

✓ 一对一解答,针对您的具体情况给出建议

✓ 支持图文、视频多种咨询方式

{/* 咨询方式选择 */}

选择咨询方式

{services.map((service) => ( ))}
{/* 推荐医生 */}

🏥 推荐专家

{doctors.map((doctor, index) => (
{/* 医生头像 */}
{doctor.name.charAt(0)}

{doctor.name}

{doctor.title} {doctor.rating >= 4.9 && ( )}

{doctor.hospital} · {doctor.specialty}

{doctor.experience}

{doctor.rating} ({doctor.reviewCount}评价)
{doctor.consultCount}次咨询
{doctor.tags.map((tag, i) => ( {tag} ))}
响应时间:{doctor.responseTime}
咨询费用 ¥{doctor.price} /次
))}
{/* 咨询流程 */}

📋 咨询流程

{[ { step: 1, text: "选择医生和咨询方式" }, { step: 2, text: "上传检查报告和问题描述" }, { step: 3, text: "支付咨询费用" }, { step: 4, text: "医生接单并给出专业建议" }, { step: 5, text: "可追问3次,获得满意答复" }, ].map((item) => (
{item.step}

{item.text}

))}
{/* 温馨提示 */}

⚠️ 重要提示

  • • 在线咨询仅供参考,不能替代线下就诊
  • • 如有紧急情况,请立即前往医院就诊
  • • 咨询记录会保存,可随时查看
  • • 医生回复后24小时内可免费追问
); }