import request from '@/utils/request'

const baseUrl = import.meta.env.VITE_APP_BASE_API
// 查询项目成员列表
export function listMessage(query) {
  return request({
    url: baseUrl + '/business/message/list',
    method: 'get',
    params: query
  })
}

// 查询项目成员详细
export function getMessage(id) {
  return request({
    url: baseUrl + '/business/message/' + id,
    method: 'get'
  })
}

// 新增项目成员
export function addMessage(data) {
  return request({
    url: baseUrl + '/business/message',
    method: 'post',
    data: data
  })
}

// 修改项目成员
export function updateMessage(data) {
  return request({
    url: baseUrl + '/business/message',
    method: 'put',
    data: data
  })
}

// 删除项目成员
export function delMessage(id) {
  return request({
    url: baseUrl + '/business/message/' + id,
    method: 'delete'
  })
}

export function readMessage(data) {
  return request({
    url: baseUrl + '/business/message/read',
    method: 'post',
    data: data
  })
}
