import request from '@/utils/request';

// 查询资源列表
export function listSysres(query) {
  return request({
    url: '/system/res/list',
    method: 'get',
    params: query
  });
}

// 查询资源详细
export function getSysres(resId) {
  return request({
    url: '/system/res/info',
    method: 'get',
    params: { resId: resId }
  });
}

// 新增资源
export function addSysres(data) {
  return request({
    url: '/system/res/add',
    method: 'post',
    data: data
  });
}

// 修改资源
export function updateSysres(data) {
  return request({
    url: '/system/res/edit',
    method: 'post',
    data: data
  });
}

// 删除资源
export function delSysres(resId) {
  return request({
    url: '/system/res/delete/' + resId,
    method: 'delete'
  });
}
