import request from '@/utils/request'

// 查询用户留言列表
export function listWords(query) {
  return request({
    url: '/tuya/leavewords/list',
    method: 'get',
    params: query
  })
}

// 查询用户留言详细
export function getWords(wordsId) {
  return request({
    url: '/tuya/leavewords/' + wordsId,
    method: 'get'
  })
}

// 新增用户留言
export function addWords(data) {
  return request({
    url: '/tuya/leavewords',
    method: 'post',
    data: data
  })
}

// 修改用户留言
export function updateWords(data) {
  return request({
    url: '/tuya/leavewords',
    method: 'put',
    data: data
  })
}

// 删除用户留言
export function delWords(wordsId) {
  return request({
    url: '/tuya/leavewords/' + wordsId,
    method: 'delete'
  })
}
