11 lines
382 B
TypeScript
11 lines
382 B
TypeScript
import api from "./api";
|
|
import type { ProductScanResponse } from "../types/api";
|
|
|
|
/** 扫码查询 — 根据 16 位产品身份证查产品 + 顶层任务 */
|
|
export async function scanProduct(serialNumber: string): Promise<ProductScanResponse> {
|
|
const { data } = await api.get<ProductScanResponse>(
|
|
`/products/scan/${encodeURIComponent(serialNumber)}`
|
|
);
|
|
return data;
|
|
}
|