Blame view

src/api/article.js 843 Bytes
d7d9c38c2   Adam   auto commit the c...
1
  import request from '@/utils/request'
50760eab9   Adam   auto commit the c...
2
3
4
5
6
7
8
  // export const getPersonInfo = data => {
  //   return service({
  //     url: '/person_pay/getpersoninfo',
  //     method: 'post',
  //     data
  //   })
  // }
d7d9c38c2   Adam   auto commit the c...
9
10
  export function fetchList(query) {
    return request({
50760eab9   Adam   auto commit the c...
11
      url: '/yp/article/list',
d7d9c38c2   Adam   auto commit the c...
12
13
14
15
16
17
18
      method: 'get',
      params: query
    })
  }
  
  export function fetchArticle(id) {
    return request({
50760eab9   Adam   auto commit the c...
19
      url: '/yp/article/detail',
d7d9c38c2   Adam   auto commit the c...
20
      method: 'get',
50760eab9   Adam   auto commit the c...
21
22
23
      params: {
        id
      }
d7d9c38c2   Adam   auto commit the c...
24
25
26
27
28
    })
  }
  
  export function fetchPv(pv) {
    return request({
50760eab9   Adam   auto commit the c...
29
      url: '/yp/article/pv',
d7d9c38c2   Adam   auto commit the c...
30
      method: 'get',
50760eab9   Adam   auto commit the c...
31
32
33
      params: {
        pv
      }
d7d9c38c2   Adam   auto commit the c...
34
35
36
37
38
    })
  }
  
  export function createArticle(data) {
    return request({
50760eab9   Adam   auto commit the c...
39
      url: '/yp/article/create',
d7d9c38c2   Adam   auto commit the c...
40
41
42
43
44
45
46
      method: 'post',
      data
    })
  }
  
  export function updateArticle(data) {
    return request({
50760eab9   Adam   auto commit the c...
47
      url: '/yp/article/update',
d7d9c38c2   Adam   auto commit the c...
48
49
50
51
      method: 'post',
      data
    })
  }