system.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import service from '@/utils/request'
  2. // @Tags systrm
  3. // @Summary 获取配置文件内容
  4. // @Security ApiKeyAuth
  5. // @Produce application/json
  6. // @Success 200 {string} string "{"success":true,"data":{},"msg":"返回成功"}"
  7. // @Router /system/getSystemConfig [post]
  8. export const getSystemConfig = () => {
  9. return service({
  10. url: '/system/getSystemConfig',
  11. method: 'post'
  12. })
  13. }
  14. // @Tags system
  15. // @Summary 设置配置文件内容
  16. // @Security ApiKeyAuth
  17. // @Produce application/json
  18. // @Param data body sysModel.System true
  19. // @Success 200 {string} string "{"success":true,"data":{},"msg":"返回成功"}"
  20. // @Router /system/setSystemConfig [post]
  21. export const setSystemConfig = (data) => {
  22. return service({
  23. url: '/system/setSystemConfig',
  24. method: 'post',
  25. data
  26. })
  27. }
  28. // @Tags system
  29. // @Summary 获取服务器运行状态
  30. // @Security ApiKeyAuth
  31. // @Produce application/json
  32. // @Success 200 {string} string "{"success":true,"data":{},"msg":"返回成功"}"
  33. // @Router /system/getServerInfo [post]
  34. export const getSystemState = () => {
  35. return service({
  36. url: '/system/getServerInfo',
  37. method: 'post',
  38. donNotShowLoading: true
  39. })
  40. }