api.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. import service from '@/utils/request'
  2. // @Tags Test
  3. // @Summary 创建Test
  4. // @Security ApiKeyAuth
  5. // @accept application/json
  6. // @Produce application/json
  7. // @Param data body autocode.Test true "创建Test"
  8. // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
  9. // @Router /t/createTest [post]
  10. export const createTest = (data) => {
  11. return service({
  12. url: "/t/createTest",
  13. method: 'post',
  14. data
  15. })
  16. }
  17. // @Tags Test
  18. // @Summary 删除Test
  19. // @Security ApiKeyAuth
  20. // @accept application/json
  21. // @Produce application/json
  22. // @Param data body autocode.Test true "删除Test"
  23. // @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
  24. // @Router /t/deleteTest [post]
  25. export const deleteTest = (data) => {
  26. return service({
  27. url: "/t/deleteTest",
  28. method: 'post',
  29. data
  30. })
  31. }
  32. // @Tags Test
  33. // @Summary 更新Test
  34. // @Security ApiKeyAuth
  35. // @accept application/json
  36. // @Produce application/json
  37. // @Param data body autocode.Test true "更新Test"
  38. // @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
  39. // @Router /t/updateTest [post]
  40. export const updateTest = (data) => {
  41. return service({
  42. url: "/t/updateTest",
  43. method: 'post',
  44. data
  45. })
  46. }
  47. // @Tags Test
  48. // @Summary 用id查询Test
  49. // @Security ApiKeyAuth
  50. // @accept application/json
  51. // @Produce application/json
  52. // @Param data body autocode.Test true "用id查询Test"
  53. // @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
  54. // @Router /t/findTest [post]
  55. export const findTest = (data) => {
  56. return service({
  57. url: "/t/findTest",
  58. method: 'post',
  59. data
  60. })
  61. }
  62. // @Tags Test
  63. // @Summary 分页获取Test列表
  64. // @Security ApiKeyAuth
  65. // @accept application/json
  66. // @Produce application/json
  67. // @Param data body modelInterface.PageInfo true "分页获取Test列表"
  68. // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
  69. // @Router /t/getTestList [post]
  70. export const getTestList = (data) => {
  71. return service({
  72. url: "/t/getTestList",
  73. method: 'post',
  74. data
  75. })
  76. }