import request from '@/utils/request'; /** * 添加钥匙 */ export function addKey(data) { return request({ url: 'lockInf/addKey', method: 'POST', data, }); } /** * 删除钥匙 */ export function delKey(keyId) { return request({ url: 'lockInf/delKey', method: 'GET', params: { keyId }, }); } /** * 查询所有钥匙信息 * { keyName, pageNum, pageSize, uname * } * @returns */ export function getAllKeyList(params) { return request({ url: 'lockInf/getAllKeyInf', method: 'GET', params }); } /** * 授权时查询所有钥匙信息(不分页) * * @returns */ export function getKeyInfAuth() { return request({ url: 'lockInf/getKeyInfAuth', method: 'GET', }); } /** * 查询所有钥匙名信息(用于下拉) */ export function authKey() { return request({ url: 'lockInf/getkinf', method: 'GET', }); } /** * 更新钥匙信息 */ export function updateKey(data) { return request({ url: 'lockInf/updateKey', method: 'POST', data, }); }