第一次提交
This commit is contained in:
25
api/article.js
Normal file
25
api/article.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import http from './index.js';
|
||||
|
||||
// 分页查询文章
|
||||
export const pageArticle = (params) => http.get('/cms/article/page', {params})
|
||||
|
||||
// 查询文章
|
||||
export const getArticle = (articleId) => http.get('/cms/article/' + articleId)
|
||||
|
||||
// 查询全部文字
|
||||
export const listArticle = (params) => http.get('/cms/article', {params})
|
||||
|
||||
// 添加文章
|
||||
export const addArticle = (data) => http.post('/cms/article', data)
|
||||
|
||||
// 删除文章
|
||||
export const removeArticle = (id) => http.delete('/cms/article/' + id)
|
||||
|
||||
|
||||
export default {
|
||||
pageArticle,
|
||||
listArticle,
|
||||
getArticle,
|
||||
addArticle,
|
||||
removeArticle
|
||||
}
|
||||
Reference in New Issue
Block a user