import request from '@/utils/request'

// list
export function getEssayList(query) {
  return request({
    url: '/shian/essay/list',
    method: 'get',
    params:query
  })
}

// export
export function exportEssay(query) {
    return request({
        url: '/shian/essay/export',
        method: 'get',
         params:query
    })
}

// DELETE
export function deleteEssay(ids) { 
    return request({
        url: `/shian/essay/${ids}`,
        method:'DELETE'
    })
}

// info
export function getinfo(id) { 
    return request({
        url: `/shian/essay/${id}`,
        method:'get'
    })
}

// add
export function addEssay(data) { 
    return request({
        url: '/shian/essay',
        method: 'post',
        data
    })
}

// update
export function updataEssay(data) { 
    return request({
        url: '/shian/essay',
        method:'put',
        data
    })
}