geo/frontend/lib/api/diagnosis.ts

20 lines
746 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { fetchWithAuth } from "./client";
export const diagnosisApi = {
/** 获取SEO诊断结果 */
getSEODiagnosis: (token: string, brandId: string) =>
fetchWithAuth(`/api/v1/diagnosis/seo/${brandId}`, {}, token),
/** 触发GEO诊断POST异步任务 */
triggerGEODiagnosis: (token: string, brandId: string) =>
fetchWithAuth(`/api/v1/diagnosis/geo/${brandId}`, { method: "POST" }, token),
/** 获取GEO诊断结果 */
getGEODiagnosis: (token: string, brandId: string) =>
fetchWithAuth(`/api/v1/diagnosis/geo/${brandId}/result`, {}, token),
/** 获取综合诊断结果 */
getCombinedDiagnosis: (token: string, brandId: string) =>
fetchWithAuth(`/api/v1/diagnosis/combined/${brandId}`, {}, token),
};