"use client"; import { useState } from "react"; import { Card } from "@/components/ui/Card"; import { Button } from "@/components/ui/Button"; import { Input } from "@/components/ui/Input"; const mockHospitals = [ { id: "h1", name: "宠颐生动物医院", address: "朝阳区建国路88号", phone: "010-88886666", rating: 4.8, distance: 1.2, services: ["疫苗", "体检", "手术", "美容"] }, { id: "h2", name: "瑞鹏宠物医院", address: "海淀区中关村大街1号", phone: "010-66668888", rating: 4.6, distance: 2.8, services: ["急诊", "住院", "化验"] }, { id: "h3", name: "佳雯宠物诊所", address: "西城区金融街16号", phone: "010-55556666", rating: 4.5, distance: 3.5, services: ["疫苗", "驱虫", "体检"] }, ]; export default function HospitalPage() { const [search, setSearch] = useState(""); const filtered = mockHospitals.filter(h => h.name.includes(search) || h.address.includes(search) ); return (
查找附近的宠物医院
{h.address}
{h.distance}km · {h.phone}