代码优化提交
This commit is contained in:
41
Store_vue/api/modules/supply.js
Normal file
41
Store_vue/api/modules/supply.js
Normal file
@@ -0,0 +1,41 @@
|
||||
import { request, requestWithRetry } from '../config'
|
||||
|
||||
// 供应链相关API
|
||||
export const supplyApi = {
|
||||
// 获取供应商列表
|
||||
getVendorList: (page, pageSize) => {
|
||||
return request({
|
||||
url: '/v1/store/vendor/list',
|
||||
method: 'GET',
|
||||
data: {
|
||||
page: page || 1,
|
||||
page_size: pageSize || 10
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取供应商详情
|
||||
getVendorDetail: (id) => {
|
||||
return request({
|
||||
url: '/v1/store/vendor/detail',
|
||||
method: 'GET',
|
||||
data: {
|
||||
id: id
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 提交订单
|
||||
submitOrder: (packageId) => {
|
||||
return request({
|
||||
url: '/v1/store/vendor/order',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
packageId: packageId
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user