order.js 990 Bytes
Newer Older
张成 committed
1
import request from "@/utils/request";
张成 committed
2 3 4 5

// 查询订单列表
export function listOrder(query) {
  return request({
张成 committed
6 7 8 9
    url: "/order/list",
    method: "get",
    params: query,
  });
张成 committed
10 11 12 13 14
}

// 查询订单详细
export function getOrder(id) {
  return request({
张成 committed
15 16 17
    url: "/order/" + id,
    method: "get",
  });
张成 committed
18 19 20 21 22
}

// 新增订单
export function addOrder(data) {
  return request({
张成 committed
23 24 25 26
    url: "/order",
    method: "post",
    data: data,
  });
张成 committed
27 28 29 30 31
}

// 修改订单
export function updateOrder(data) {
  return request({
张成 committed
32 33 34 35
    url: "/order",
    method: "put",
    data: data,
  });
张成 committed
36 37 38 39 40
}

// 删除订单
export function delOrder(id) {
  return request({
张成 committed
41 42 43
    url: "/order/" + id,
    method: "delete",
  });
张成 committed
44
}
lixiaomin committed
45 46 47 48 49 50 51 52 53

// 查询订单日志列表
export function getLogList(query) {
  return request({
    url: "/system/log/list",
    method: "get",
    params: query,
  });
}
lixiaomin committed
54 55 56 57 58 59 60 61 62

// 退款
export function refund(data) {
  return request({
    url: "/system/refund",
    method: "post",
    data: data,
  });
}