文章管理、前端api、视图代码模板生成

This commit is contained in:
陈淳
2022-10-14 18:08:45 +08:00
parent 88073aaa20
commit 420701bf23
15 changed files with 1240 additions and 2 deletions

View File

@@ -0,0 +1,45 @@
import request from '@/utils/request'
// 分页查询
export function listData(query) {
return request({
url: '/article/pageList',
method: 'get',
params: query
})
}
// id查询
export function getData(code) {
return request({
url: '/article/getById/' + code,
method: 'get'
})
}
// 新增
export function addData(data) {
return request({
url: '/article/add',
method: 'post',
data: data
})
}
// 修改
export function updateData(data) {
return request({
url: '/article/update',
method: 'put',
data: data
})
}
// 删除
export function delData(code) {
return request({
url: '/article/delList',
method: 'delete',
data:"string"==typeof(code)?code:[code]
})
}