theme.js 933 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /**
  2. * 主题设置
  3. * @see https://api.halo.run/content-api.html#tag/theme-controller
  4. */
  5. import HttpHandler from '@/common/http/request.js'
  6. export default {
  7. /**
  8. * 获取激活主题的信息
  9. * @param {Object} params 参数
  10. */
  11. geActivationThemeList: (params) => {
  12. return HttpHandler.Get(`/api/content/themes/activation`, params)
  13. },
  14. /**
  15. * 获取激活的主题设置
  16. * @param {Object} params 参数
  17. */
  18. getActivationThemeSettings: (params) => {
  19. return HttpHandler.Get(`/api/content/themes/activation/settings`, params)
  20. },
  21. /**
  22. * 根据主题ID列出主题设置
  23. * @param {Object} params 参数
  24. */
  25. getThemeSettingsByThemeId: (themeId) => {
  26. return HttpHandler.Get(`/api/content/themes/${themeId}/settings`)
  27. },
  28. /**
  29. * 通过主题ID获取主题属性
  30. * @param {Object} params 参数
  31. */
  32. getThemePropertyByThemeId: (themeId) => {
  33. return HttpHandler.Get(`/api/content/themes/${themeId}`)
  34. },
  35. }