coupon.js 871 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
import request from "@/utils/request";

// 查询列表
export function listClass(query) {
  return request({
    url: "/system/category/list",
    method: "get",
    params: query,
  });
}

// 查询详细
export function getClass(id) {
  return request({
    url: "/system/category/" + id,
    method: "get",
  });
}

// 新增
lixiaomin committed
21
export function addCoupon(data) {
22
  return request({
lixiaomin committed
23 24
    url: "/coupon",
    method: "put",
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
    data: data,
  });
}

// 修改
export function updateClass(data) {
  return request({
    url: "/system/category",
    method: "put",
    data: data,
  });
}

// 删除
export function delClass(id) {
  return request({
    url: "/system/category/" + id,
    method: "delete",
  });
}

// 查询排序列表
export function turnList(query) {
  return request({
    url: "/system/category/turnOrder",
    method: "get",
    params: query,
  });
}