article.js 670 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import request from '@/utils/request'
  2. export function listArticle (query) {
  3. return request({
  4. url: '/richText/list',
  5. method: 'get',
  6. params: query
  7. })
  8. }
  9. export function deleteArticle (data) {
  10. return request({
  11. url: '/richText/delete',
  12. method: 'post',
  13. data
  14. })
  15. }
  16. export function publishArticle (data) {
  17. return request({
  18. url: '/richText/create',
  19. method: 'post',
  20. data
  21. })
  22. }
  23. export function detailArticle (id) {
  24. return request({
  25. url: '/richText/detail',
  26. method: 'get',
  27. params: { id }
  28. })
  29. }
  30. export function editArticle (data) {
  31. return request({
  32. url: '/richText/update',
  33. method: 'post',
  34. data
  35. })
  36. }