import { useMyRequest } from '~/composables/useFetchRequest'

export enum Api {
  VideoOrBlogsList = '/client/content/list',
  VideoOrBlogsDetail = '/client/content/detail',
  BlogCategoryList = '/client/content/category/content',
}

/**
 * 获取博客
 * @param params
 * @returns
 */
export async function getBlogsListApi(params?: any) {
  return await useMyRequest().get(Api.VideoOrBlogsList, params)
}

/**
 * 获取博客详情
 * @param params
 * @returns
 */
export async function getBlogsDetailApi(params?: any) {
  return await useMyRequest().get(Api.VideoOrBlogsDetail, params)
}
/**
 * 获取最新一条博客详情
 * @param params
 * @returns
 */
export async function getReleaseBlogApi(params?: any) {
  return await useMyRequest().get(Api.VideoOrBlogsList, params)
}
/**
 * 获取博客分类
 * @param params
 * @returns
 */
export async function getBlogCategoryListApi(params?: any) {
  return await useMyRequest().get(Api.BlogCategoryList, params)
}
