import langToCheck from "@/hook/lang.js";
import { api } from './config.js';

// 首页轮播图
export const GetCarouseApi = () => {
  return api("/website/get/homePageCarousel_list", {
    method: 'POST',
    body: {
      locale: langToCheck()
    }
  });
};

// 产品分类
export const GetProductCategoryApi = () => {
  return api("/website/get/productCategory_list", {
    method: 'POST',
    body: {
      locale: langToCheck()
    }
  });
};

// 产品列表
export const GetProductApi = (data) => {
  return api("/website/get/product_list", {
    method: 'POST',
    body: data
  });
};

// 产品详情
export const GetProductDetailApi = (data) => {
  return api("/website/get/product_detail", {
    method: 'POST',
    body: data
  });
};

// 资讯列表
export const GetNewsApi = (data) => {
  return api("/website/get/news_list", {
    method: 'POST',
    body: data
  });
};

// 资讯详情
export const GetNewsDetailApi = (data) => {
  return api("/website/get/news_detail", {
    method: 'POST',
    body: data
  });
};

// 联系我们提交
export const GetMessageApi = (data) => {
  return api("/website/add/message", {
    method: 'POST',
    body: data
  });
};

// 证书列表
export const GetCertificateApi = () => {
  return api("/website/get/certificate_list", {
    method: 'POST',
    body: {
      locale: langToCheck()
    }
  });
};

// app下载
export const GetDownloadApi = () => {
  return api("/website/get/appInstallPackage", {
    method: 'POST',
    body: {
      locale: langToCheck()
    }
  });
};