import http from "@/http/http";
import { ResultInterface } from "../base/BaseDataModel";
import { CentralBankRatePageParam, CentralBankRateParams, CentralBankRateResult, GetCentralBankRate } from "./homeModle";
enum Api {
    centralBankRateList = '/api/CentralBankRate/list',//央行汇率列表
    getCentralBankRate = '/api/CentralBankRate/getCentralBankRate',//央行汇率
    pageList = '/api/CentralBankRate/pageList',//分页央行汇率列表
}

/**
 * 央行汇率列表
 */
export const api_home_CentralBankRateList = async (params = {}) => {
    return await http.post<CentralBankRateResult[]>(Api.centralBankRateList , params)
}

/**
 * 央行汇率
 */
export const api_GetCentralBankRate = async (params: CentralBankRateParams) => {
    return await http.post<GetCentralBankRate>(Api.getCentralBankRate, params)
}

/**
 * 央行分页汇率列表
 */
export const api_PageCentralBankRateList = async (params: CentralBankRatePageParam) => {
    return await http.post<ResultInterface<GetCentralBankRate>>(Api.pageList, params)
}