mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-04-06 03:57:53 +08:00
39 lines
560 B
JavaScript
39 lines
560 B
JavaScript
import request from '@/utils/request'
|
|
|
|
export function getRoutes() {
|
|
return request({
|
|
url: '/routes',
|
|
method: 'get'
|
|
})
|
|
}
|
|
|
|
export function getRoles() {
|
|
return request({
|
|
url: '/roles',
|
|
method: 'get'
|
|
})
|
|
}
|
|
|
|
export function deleteRole(id) {
|
|
return request({
|
|
url: `/roles/${id}`,
|
|
method: 'delete'
|
|
})
|
|
}
|
|
|
|
export function addRole(data) {
|
|
return request({
|
|
url: '/roles',
|
|
method: 'post',
|
|
data
|
|
})
|
|
}
|
|
|
|
export function updateRole(key, data) {
|
|
return request({
|
|
url: `/roles/${key}`,
|
|
method: 'put',
|
|
data
|
|
})
|
|
}
|