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

const api = {
  roomItem: '/meeting/roomItem'
}

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

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

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

export const roomItemExport = api.roomItem + '/export'
