单表增删改查

This commit is contained in:
2025-07-18 10:05:56 +08:00
parent c933c655c1
commit 31dd4f4f12
13 changed files with 2679 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询产品列表
export function listProduct(query) {
return request({
url: '/klp/product/list',
method: 'get',
params: query
})
}
// 查询产品详细
export function getProduct(productId) {
return request({
url: '/klp/product/' + productId,
method: 'get'
})
}
// 新增产品
export function addProduct(data) {
return request({
url: '/klp/product',
method: 'post',
data: data
})
}
// 修改产品
export function updateProduct(data) {
return request({
url: '/klp/product',
method: 'put',
data: data
})
}
// 删除产品
export function delProduct(productId) {
return request({
url: '/klp/product/' + productId,
method: 'delete'
})
}