python-flask和Vue两种模式初模板

This commit is contained in:
dxc
2026-01-26 17:00:12 +08:00
parent ee9f4aed3e
commit 2f8a5c55b1
36 changed files with 943 additions and 126 deletions

View File

View File

View File

@ -0,0 +1,39 @@
import request from '@/utils/request'
// 注意baseURL 已经是 '/api/v1' 了,所以这里只需要写剩下的部分
// 获取入库列表
// 最终请求: /api/v1 + /stocks/inbound = /api/v1/stocks/inbound
export function getInboundList(params: any) {
return request({
url: '/stocks/inbound', // <--- 修改点:去掉了 /api/v1
method: 'get',
params
})
}
// 新增入库
export function createInbound(data: any) {
return request({
url: '/stocks/inbound', // <--- 修改点
method: 'post',
data
})
}
// 修改入库
export function updateInbound(id: number, data: any) {
return request({
url: `/stocks/inbound/${id}`, // <--- 修改点
method: 'put',
data
})
}
// 删除入库
export function deleteInbound(id: number) {
return request({
url: `/stocks/inbound/${id}`, // <--- 修改点
method: 'delete'
})
}

View File