authority.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import service from '@/utils/request'
  2. // @Summary 用户登录
  3. // @Produce application/json
  4. // @Param {
  5. // page int
  6. // pageSize int
  7. // }
  8. // @Router /authority/getAuthorityList [post]
  9. export const getAuthorityList = (data) => {
  10. return service({
  11. url: "/authority/getAuthorityList",
  12. method: 'post',
  13. data
  14. })
  15. }
  16. // @Summary 删除角色
  17. // @Security ApiKeyAuth
  18. // @accept application/json
  19. // @Produce application/json
  20. // @Param data body {authorityId uint} true "删除角色"
  21. // @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
  22. // @Router /authority/deleteAuthority [post]
  23. export const deleteAuthority = (data) => {
  24. return service({
  25. url: "/authority/deleteAuthority",
  26. method: 'post',
  27. data
  28. })
  29. }
  30. // @Summary 创建角色
  31. // @Security ApiKeyAuth
  32. // @accept application/json
  33. // @Produce application/json
  34. // @Param data body api.CreateAuthorityPatams true "创建角色"
  35. // @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
  36. // @Router /authority/createAuthority [post]
  37. export const createAuthority = (data) => {
  38. return service({
  39. url: "/authority/createAuthority",
  40. method: 'post',
  41. data
  42. })
  43. }