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.
yanzong_qianduan/api/article/index.js

48 lines
1.1 KiB

4 months ago
import request from '@/utils/request'
// api地址
const api = {
list: 'article/list',
detail: 'article/detail',
del: 'article/delete',
edit: 'article/edit',
add: 'article/add',
articleCatList: 'article.category/list',
articleCatAdd: 'article/addCategory',
articleCatDelete: 'article/articleCatDelete',
articleCatEdit: 'storeKeeper/articleCatEdit'
}
// 文章分类列表 新增
export function articleCatAdd(param, option) {
return request.post(api.articleCatAdd, param, option)
}
// 文章分类列表
export function articleCatList(param, option) {
return request.get(api.articleCatList, param, option)
}
// 文章 编辑
export function edit(param, option) {
return request.post(api.edit, param, option)
}
// 文章 新增
export function add(param, option) {
return request.post(api.add, param, option)
}
// 文章 删除
export function del(param, option) {
return request.post(api.del, param, option)
}
// 文章列表
export function list(param, option) {
return request.get(api.list, param, option)
}
// 文章详情
export function detail(articleId) {
return request.get(api.detail, { articleId })
}