第一次
This commit is contained in:
45
src/services/goods/index.ts
Normal file
45
src/services/goods/index.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
import { request } from '@umijs/max';
|
||||
|
||||
export async function goodsPage(body) {
|
||||
return request('/admin/goods/page', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
data: body || {},
|
||||
});
|
||||
}
|
||||
|
||||
export async function goodsAdd(body) {
|
||||
return request('/admin/goods/add', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
data: body || {},
|
||||
});
|
||||
}
|
||||
|
||||
export async function goodsUpdate(body) {
|
||||
return request('/admin/goods/update', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
data: body || {},
|
||||
});
|
||||
}
|
||||
|
||||
export async function goodsInfo(params) {
|
||||
return request('/admin/goods/detail', {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user