chore: init bj_power monorepo (dashboard/mes/wms/wms_client/workstation), clear subproject git metadata and align naming to folder names
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
import { MockMethod, Recordable } from 'vite-plugin-mock'
|
||||
import { resultPageSuccess, resultSuccess } from './_util'
|
||||
|
||||
export default [
|
||||
// 查询商品单位列表
|
||||
{
|
||||
url: '/api/v1/units',
|
||||
method: 'get',
|
||||
response: () => {
|
||||
return resultPageSuccess({
|
||||
'data|10': [
|
||||
{
|
||||
'id|+1': 1,
|
||||
name: '@/cname',
|
||||
remark: '@/ctitle'
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
},
|
||||
// 查询商品单位信息
|
||||
{
|
||||
url: /\/api\/v1\/unit\/\d+$/,
|
||||
method: 'get',
|
||||
timeout: 500,
|
||||
response: (opt: { url: Recordable }) => {
|
||||
const unitId = opt.url.split('/')[5]
|
||||
return resultSuccess({
|
||||
id: Number(unitId),
|
||||
name: '@/cname',
|
||||
remark: '@/ctitle'
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 新建商品单位
|
||||
{
|
||||
url: /\/api\/v1\/unit\/\d+$/,
|
||||
method: 'post',
|
||||
response: () => {
|
||||
return resultSuccess(null)
|
||||
}
|
||||
},
|
||||
// 编辑商品单位
|
||||
{
|
||||
url: /\/api\/v1\/unit\/\d+$/,
|
||||
method: 'put',
|
||||
response: () => {
|
||||
return resultSuccess(null)
|
||||
}
|
||||
},
|
||||
// 删除商品单位
|
||||
{
|
||||
url: /\/api\/v1\/unit\/\d+$/,
|
||||
method: 'delete',
|
||||
timeout: 300,
|
||||
response: () => {
|
||||
return resultSuccess(null)
|
||||
}
|
||||
}
|
||||
] as MockMethod[]
|
||||
Reference in New Issue
Block a user