import service from '@/utils/request'

// @tag goods
// @summary 获取商品（文章）列表
// @param {object} params
// @return {object} data
// @router get /user/list
export const list = (params) => {
  return service({
    url: '/article/list',
    method: 'get',
    params
  })
}

export const add = (data) => {
  return service({
    url: '/article',
    method: 'post',
    data
  })
}
export const edit = (data) => {
  return service({
    url: '/article',
    method: 'put',
    data
  })
}
export const del = (data) => {
  return service({
    url: '/article',
    method: 'delete',
    data
  })
}
export const detail = (id) => {
  return service({
    url: '/article/'+ id,
    method: 'get',
  })
}

export const getTechers = (params) => {
    return service({
        url: '/app_user/teachers',
        method: 'get',
        params
    })
}

//BulkUpload
export const bulkUpload = (data) => {
  return service({
    url: '/article/bulk',
    method: 'post',
    data
  })
}