You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.1 KiB
47 lines
1.1 KiB
import request from '@/utils/request'
|
|
|
|
// api地址
|
|
const api = {
|
|
todoCounts: 'order/todoCounts',
|
|
list: 'order/list',
|
|
detail: 'order/detail',
|
|
express: 'order/express',
|
|
cancel: 'order/cancel',
|
|
receipt: 'order/receipt',
|
|
pay: 'order/pay'
|
|
}
|
|
|
|
// 当前用户待处理的订单数量
|
|
export function todoCounts(param, option) {
|
|
return request.get(api.todoCounts, param, option)
|
|
}
|
|
|
|
// 我的订单列表
|
|
export function list(param, option) {
|
|
return request.get(api.list, param, option)
|
|
}
|
|
|
|
// 订单详情
|
|
export function detail(orderId, param) {
|
|
return request.get(api.detail, { orderId, ...param })
|
|
}
|
|
|
|
// 获取物流信息
|
|
export function express(orderId, param) {
|
|
return request.get(api.express, { orderId, ...param })
|
|
}
|
|
|
|
// 取消订单
|
|
export function cancel(orderId, data) {
|
|
return request.post(api.cancel, { orderId, ...data })
|
|
}
|
|
|
|
// 确认收货
|
|
export function receipt(orderId, data) {
|
|
return request.post(api.receipt, { orderId, ...data })
|
|
}
|
|
|
|
// 立即支付
|
|
export function pay(orderId, payType, param) {
|
|
return request.get(api.pay, { orderId, payType, ...param })
|
|
}
|
|
|