import request from '@/utils/request'


/**
 * 便民热线列表
 */
export function getHotlineList(params: Record<string, any>) {
    return request.get('xypm/content/hotline', params)
}

/**
 * 新闻列表
 */
export function getArticleList(params: Record<string, any>) {
    return request.get('xypm/content/article', params)
}

/**
 * 获取文章列表供组件调用
 */
export function getArticleComponents(params: Record<string, any>) {
    return request.get(`xypm/content/article/components`, params)
}

/**
 * 新闻详情
 */
export function getArticleDetail(id: number) {
    return request.get(`xypm/content/article/${id}`)
}

/**
 * 公告列表
 */
export function getNoticeList(params: Record<string, any>) {
    return request.get('xypm/content/notice', params)
}

/**
 * 公告详情
 */
export function getNoticeDetail(id: number) {
    return request.get(`xypm/content/notice/${id}`)
}

/**
 * 分类列表
 */
export function getCategoryList(type: string) {
    return request.get(`xypm/content/category/${type}`)
}