const { request } = require('../../../api/request')
/**
 * 订单列表
 * @param obj
 * @returns {Promise}
 */
export const getOrderList = (obj) => request({
  url: '/api/user/order/list',
  method: 'POST',
  data: {
    'page': obj.pageNum,
    'page_size': obj.pageSize,
    'type': obj.type // 订单状态
  },
  showLoading: true
})
/**
 * 订单删除
 * @param id
 * @returns {Promise | Promise<unknown>}
 */
export const postOrderDelete = (id) => request({
  url: '/api/user/order/delete',
  method: 'POST',
  data: {
    id
  },
  showLoading: true
})
