import { useState } from "react"; import { DocumentationPage } from "./Documentation"; import { Brand, Icon, navigate, type Route } from "./ui"; export function PublicSite({ route }: { route: Exclude }) { return (
{route === "docs" ? : }
); } function scrollToSection(id: string) { document.getElementById(id)?.scrollIntoView({ behavior: "smooth", block: "start" }); } function PublicHeader({ route }: { route: Exclude }) { return (
); } function HomePage() { return (

车辆数据,按需开放。

用统一 API 访问车辆日用氢量与日里程。每次调用受应用、车辆和日期范围约束。

2 项数据能力 VIN / 车牌授权 指定 1–200 辆 / 留空查全部 Trace ID
01

可用接口

02

开始接入

{[ ["01", "获取 AppKey", "创建开放应用并保存一次性展示的 AppKey。"], ["02", "授权车辆", "按 VIN 或车牌配置车辆和有效期。"], ["03", "调用 API", "按自然日查询数据,并记录 Trace ID。"] ].map(([number, title, body]) => (
{number}

{title}

{body}

))}

查看完整接口文档

请求参数、响应结构、错误码与重试策略。

); } type ApiKind = "mileage" | "hydrogen"; const apiExamples: Record = { mileage: { tab: "日里程", path: "/api/v1/vehicles/mileage/query", responseField: "dailyMileageKm", value: "215.6", extraResponse: `\n "totalMileageKm": 12345.6,\n "dataTime": "2026-07-19T23:58:45+08:00",\n "updatedAt": "2026-07-20T05:10:00+08:00",` }, hydrogen: { tab: "日用氢量", path: "/api/v1/vehicles/hydrogen-consumption/query", responseField: "hydrogenConsumptionKg", value: "8.42" } }; function ApiWorkbench() { const [kind, setKind] = useState("mileage"); const current = apiExamples[kind]; return (
{(Object.keys(apiExamples) as ApiKind[]).map((item) => ( ))}
POST{current.path}
请求
响应200 OK
{`{
  "code": "SUCCESS",
  "data": [{
    "plateNumber": "辽A00001",
    "date": "2026-07-19",
    "${current.responseField}": ${current.value},
${current.extraResponse || ""}
    "status": "NORMAL"
  }],
  "traceId": "b7ff5582ab1a4e13"
}`}
); } function ApiRow({ mark, name, path, unit }: { mark: string; name: string; path: string; unit: string }) { return (
{mark}

{name}

POST{path}

单位{unit}
); } function PublicFooter() { return ( ); }