import request from '@/utils/request'
export function fetchListAll() {
  return request({
    url:'/subject/listAll',
    method:'get',
  })
}

export function fetchList(params) {
  return request({
    url:'/subject/list',
    method:'get',
    params:params
  })
}

export function createsubject(data) {
  return request({
    url:'/subject/add',
    method:'post',
    data:data
  })
}

export function updatesubject(data) {
  return request({
    url:'/subject/update',
    method:'post',
    data:data
  })
}

export function updateStatus(id,data) {
  return request({
    url:'/subject/' + id,
    method:'post',
    data:data
  })
}

export function deletesubject(id) {
  return request({
    url:'/subject/del?id='+id,
    method:'post',
    // data:data
  })
}

export function subjectTypeList(params) {
  return request({
    url:'/subject/category/listAll',
    method:'get',
    params:params
  })
}