import request from '@/utils/request' export function getRoutes() { return request({ url: '/yp/routes', method: 'get' }) } export function getRoles() { return request({ url: '/yp/roles', method: 'get' }) } export function addRole(data) { return request({ url: '/yp/role', method: 'post', data }) } export function updateRole(id, data) { return request({ url: `/vue-element-admin/role/${id}`, method: 'put', data }) } export function deleteRole(id) { return request({ url: `/vue-element-admin/role/${id}`, method: 'delete' }) }