You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
632 B

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