import request from '@/utils/request'

// 查询订单信息列表
export function listOrder(query) {
  return request({
    url: '/system/order/list',
    method: 'get',
    params: query
  })
}
// 查询商品信息列表
export function getInitGoodsManager(query) {
  return request({
    url: '/system/AppWebManagerGoodsController/getInitGoodsManager',
    method: 'get',
    params: query
  })
}
//查询图片
export function getGoodsPictures(query) {
  return request({
    url: '/system/AppWebManagerGoodsController/getGoodsPictures',
    method: 'get',
    params: query
  })
}

// 查询订单信息详细
export function getOrder(id) {
  return request({
    url: '/system/order/' + id,
    method: 'get'
  })
}

// 新增订单信息
export function addOrder(data) {
  return request({
    url: '/system/order',
    method: 'post',
    data: data
  })
}

// 修改订单信息
export function updateOrder(data) {
  return request({
    url: '/system/order',
    method: 'put',
    data: data
  })
}
// 出售商品
export function sell(data) {
  return request({
    url: '/system/goods/sell',
    method: 'post',
    data: data
  })
}

// 删除订单信息
export function delOrder(id) {
  return request({
    url: '/system/order/' + id,
    method: 'delete'
  })
}
// 申请退款
export function refund(data) {
  return request({
    url: '/system/order/refund',
    method: 'post',
	data: data
  })
}
