import request from '@/utils/request'

// 查询共享钥匙列表
export function listKey(query) {
  return request({
    url: '/system/key/list',
    method: 'get',
    params: query
  })
}

// 查询共享钥匙详细
export function getKey(keyId) {
  return request({
    url: '/system/key/' + keyId,
    method: 'get'
  })
}

// 新增共享钥匙
export function addKey(data) {
  return request({
    url: '/system/key',
    method: 'post',
    data: data
  })
}

// 修改共享钥匙
export function updateKey(data) {
  return request({
    url: '/system/key',
    method: 'put',
    data: data
  })
}

// 删除共享钥匙
export function delKey(keyId) {
  return request({
    url: '/system/key/' + keyId,
    method: 'delete'
  })
}
