import { axios } from '@/utils/request'

const api = {
  wisdomRoom: '/admin/wisdomRoom'
}

export function getWisdomRoomList (parameter) {
  return axios({
    url: api.wisdomRoom + '/list',
    method: 'get',
    params: parameter
  })
}

export function selectStaff (parameter) {
  return axios({
    url: api.wisdomRoom + '/selectStaff',
    method: 'get',
    params: parameter
  })
}

export function saveWisdomRoom (parameter) {
  return axios({
    url: api.wisdomRoom + (parameter.id > 0 ? '/update' : '/save'),
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

export function delWisdomRoom (parameter) {
  return axios({
    url: api.wisdomRoom + '/remove',
    method: 'post',
    params: parameter
  })
}

export const wisdomRoomExport = api.wisdomRoom + '/export'
