import { request } from '@/api/request2.js'

// 查询文章列表
export function listArticle(query) {
  return request({
    url: '/mudu/article/list',
    method: 'get',
    params: query,
  })
}

// 查询文章详细
export function getArticle(id) {
  return request({
    url: '/mudu/article/' + id,
    method: 'get',
  })
}

// 新增文章
export function addArticle(data) {
  return request({
    url: '/mudu/article',
    method: 'post',
    data: data,
  })
}

// 修改文章
export function updateArticle(data) {
  return request({
    url: '/mudu/article',
    method: 'put',
    data: data,
  })
}

// 删除文章
export function delArticle(id) {
  return request({
    url: '/mudu/article/' + id,
    method: 'delete',
  })
}

// 查询安全培训列表
export function listAnquan(query) {
  return request({
    url: '/mudu/train/list',
    method: 'get',
    params: query,
  })
}