8f47aaaecd544bf22640e6c3c2b504294886941d.svn-base 696 B

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