import request from '@/utils/request'

export function roleList(query) {
    return request({
      url: '/sys/role/page',
      method: 'get',
      params: query
    })
}
export function add(data) {
    return request({
      url: '/sys/role',
      method: 'post',
      data
    })
}
export function edit(data) {
    return request({
      url: '/sys/role',
      method: 'PUT',
      data
    })
}

export function detail(data) {
    return request({
      url: '/sys/role/'+data,
      method: 'GET',
    })
}

export function del(data) {
    return request({
      url: '/sys/role/'+data,
      method: 'DELETE',
    })
}

export function menuTree(params) {
    return request({
      url: '/sys/menu/tree',
      method: 'GET',
      params
    })
}
