dashboard.ts 951 Bytes
import { ApiClient } from '../core/client';
export interface StoreItem { merchantId: string; merchantName: string }
export interface DashboardStatistics { [key: string]: number | undefined }
export interface TrendPoint { date: string; count: number }
class DashboardApi extends ApiClient {
  getdataBoard(params: Record<string, unknown>) { return this.post<DashboardStatistics>('/dataBoard/index', params); }
  getEvaluationData(params: Record<string, unknown>) { return this.post<TrendPoint[]>('/dataBoard/evaluation', params); }
  getDealData(params: Record<string, unknown>) { return this.post<TrendPoint[]>('/dataBoard/deal', params); }
  async getServiceStore(params: Record<string, unknown>) {
    const response = await this.postRop<StoreItem[]>('dj.api.scenemerchantref.query4SRefByYqShop', params);
    console.log('[usedcar] 门店接口原始返回:', response);
    return response;
  }
}
export const dashboardApi = new DashboardApi();