article.js 449 B

12345678910111213141516171819202122
  1. /**
  2. * 文章接口
  3. */
  4. import HttpHandler from '@/common/http/request.js'
  5. export default {
  6. /**
  7. * 获取文章列表
  8. * @param {Object} params 查询参数
  9. */
  10. getArticleList: (params) => {
  11. return HttpHandler.Get('/api/content/posts', params)
  12. },
  13. /**
  14. * 获取文章详情
  15. * @param {String} name 文章 name
  16. */
  17. getArticleDetail: (name) => {
  18. return HttpHandler.Get(`/apis/api.content.halo.run/v1alpha1/posts/${name}`, {})
  19. },
  20. }