VuePressVuePress
  • Introduction
  • Getting Started
  • Users

    • 身份验证
  • 管理后台

    • 用户管理
    • 角色管理
    • 权限管理
    • 操作日志
  • English
  • 简体中文
  • Introduction
  • Getting Started
  • Users

    • 身份验证
  • 管理后台

    • 用户管理
    • 角色管理
    • 权限管理
    • 操作日志
  • English
  • 简体中文
  • Users

    • 身份验证
  • 后台

    • 用户管理
    • 角色管理
    • 权限管理
    • 操作日志

角色管理

角色列表

GET /api/admin/roles

添加角色

POST /api/admin/roles

axios.post(`/api/admin/roles`, {
    name: "admin"
}).then(response => {
    console.log(response)
}).catch(error => {
    console.error(error)
})

角色详情

GET /api/admin/roles/:role

修改角色

PUT /api/admin/roles/:role

const role = 1;

axios.put(`/api/admin/roles/${role}`, {
    name: "player"
}).then(response => {
    console.log(response)
}).catch(error => {
    console.error(error)
})

删除角色

DELETE /api/admin/roles/:role

Last Updated:
Contributors: jinfakeji168
Prev
用户管理
Next
权限管理