fe-drone-ci/src/api/article.js

42 lines
744 B
JavaScript
Raw Permalink Normal View History

import request from '@/utils/request'
2017-04-19 10:43:57 +00:00
2017-08-28 05:12:44 +00:00
export function fetchList(query) {
return request({
url: '/vue-element-admin/article/list',
2017-08-28 05:12:44 +00:00
method: 'get',
params: query
2017-08-22 07:43:34 +00:00
})
2017-04-19 10:43:57 +00:00
}
2017-04-23 11:50:32 +00:00
export function fetchArticle(id) {
return request({
url: '/vue-element-admin/article/detail',
method: 'get',
params: { id }
2017-08-22 07:43:34 +00:00
})
2017-04-23 11:50:32 +00:00
}
2017-08-28 05:12:44 +00:00
export function fetchPv(pv) {
return request({
url: '/vue-element-admin/article/pv',
2017-08-28 05:12:44 +00:00
method: 'get',
params: { pv }
})
}
2017-11-30 10:02:31 +00:00
export function createArticle(data) {
return request({
url: '/vue-element-admin/article/create',
2017-11-30 10:02:31 +00:00
method: 'post',
data
})
}
export function updateArticle(data) {
return request({
url: '/vue-element-admin/article/update',
2017-11-30 10:02:31 +00:00
method: 'post',
data
})
}