import { baseRequest } from "@/utils/request";
const request = (url, ...arg) => baseRequest(`/homePage/` + url, ...arg);
const request1 = (url, ...arg) => baseRequest(`/openGovernment/` + url, ...arg);
const request2 = (url, ...arg) =>
  baseRequest(`/importantNews/singrainbureaunotice/` + url, ...arg);

export default {
  // 首页头条轮播数据
  homePage(data) {
    return request("hmcarousel/page", data, "get");
  },
  // 底下政务公开
  fairsconfigList(data) {
    return request("hmgovernmentaffairsconfig/getList", data, "get");
  },
  // 轮播图配置
  homeImgPage(data) {
    return request("hmimagenews/page", data, "get");
  },
  // 轮播图配置管理
  homeConfigPage(data) {
    return request("hmcarouselconfig/page", data, "get");
  },
  // 首页党史学习教育后面的轮播图 /homePage/
  hmcarouselconfigDetail(data) {
    return request("hmcarouselconfig/detail", data, "get");
  },
  //党史学习教育 /homePage/hmrelatedwebsitesconfig/page
  homeHistoryeduPage(data) {
    return request("hmpartyhistoryedu/page", data, "get");
  },
  //相关网站 /homePage/
  homeHmrelatePage(data) {
    return request("hmrelatedwebsitesconfig/page", data, "get");
  },
  //政策文件
  homeFilePage(data) {
    return request1("ogPolicyFile/page", data, "get");
  },
  //全文检索
  fullTextSearch(data) {
    return request2("search", data, "post");
  },
};
