1
0

option.js 597 B

123456789101112131415161718192021222324252627282930
  1. /**
  2. * 配置接口
  3. * @see https://api.halo.run/content-api.html#tag/option-controller
  4. */
  5. import HttpHandler from '@/common/http/request.js'
  6. export default {
  7. /**
  8. * 根据key获取配置
  9. * @param {String} key 配置的key
  10. */
  11. getOptionByKey: (key) => {
  12. return HttpHandler.Get(`/api/content/options/keys/${key}`)
  13. },
  14. /**
  15. * 获取配置列表(列表)
  16. */
  17. getOptionList: () => {
  18. return HttpHandler.Get(`/api/content/options/list_view`)
  19. },
  20. /**
  21. * 获取配置列表(键值对)
  22. */
  23. getOptionMap: () => {
  24. return HttpHandler.Get(`/api/content/options/map_view`)
  25. },
  26. }