config.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import request from '@/utils/request'
  2. // 查询参数列表
  3. export function listConfig(query) {
  4. return request({
  5. url: '/system/config/list',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. // 查询参数详细
  11. export function getConfig(configId) {
  12. return request({
  13. url: '/system/config/' + configId,
  14. method: 'get'
  15. })
  16. }
  17. // 根据参数键名查询参数值
  18. export function getConfigKey(configKey) {
  19. return request({
  20. url: '/system/config/configKey/' + configKey,
  21. method: 'get'
  22. })
  23. }
  24. // 新增参数配置
  25. export function addConfig(data) {
  26. return request({
  27. url: '/system/config',
  28. method: 'post',
  29. data: data
  30. })
  31. }
  32. // 修改参数配置
  33. export function updateConfig(data) {
  34. return request({
  35. url: '/system/config',
  36. method: 'put',
  37. data: data
  38. })
  39. }
  40. // 删除参数配置
  41. export function delConfig(configId) {
  42. return request({
  43. url: '/system/config/' + configId,
  44. method: 'delete'
  45. })
  46. }
  47. // 刷新参数缓存
  48. export function refreshCache() {
  49. return request({
  50. url: '/system/config/refreshCache',
  51. method: 'delete'
  52. })
  53. }
  54. //获取配置信息
  55. export function selectConfigKey(configKey) {
  56. return request({
  57. url: '/system/config/selectConfigKey/' + configKey,
  58. method: 'get'
  59. })
  60. }