shop.js 2.04 KB
Newer Older
张成 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
import request from "@/utils/request";

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

// 查询店铺详细
export function getShop(id) {
  return request({
    url: "/system/shop/" + id,
    method: "get",
  });
}

// 新增店铺
export function addShop(data) {
  return request({
    url: "/system/shop",
    method: "post",
    data: data,
  });
}

// 修改店铺
export function updateShop(data) {
  return request({
    url: "/system/shop",
    method: "put",
    data: data,
  });
}

// 删除店铺
export function delShop(id) {
  return request({
    url: "/system/shop/" + id,
    method: "delete",
  });
}

// 查询店铺分类
export function getCategoryGoods(id) {
  console.log(id);
  return request({
    url: "/system/shop/getCategoryGoods?shopId=" + id,
    method: "get",
  });
}

// 店铺新增商品
export function addGoods(params) {
  return request({
    url: "/system/shop/addGoods",
    method: "get",
    params,
  });
}

// 查询机器列表
export function machine(params) {
  return request({
    url: "/system/machine/list",
    method: "get",
    params,
  });
}

// 绑定机器
export function bindMachine(params) {
  return request({
    url: "/system/machine/bindMachine",
    method: "get",
    params,
  });
}

// 绑定机器
export function unbound(params) {
  return request({
    url: "/system/machine/unbound",
    method: "get",
    params,
  });
}
// 新增推荐
export function addRecommend(data) {
  return request({
    url: "/system/recommend",
    method: "post",
    data,
  });
}
张成 committed
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
// 新增推荐
export function recommendList(params) {
  return request({
    url: "/system/recommend/list",
    method: "get",
    params,
  });
}

// 新增推荐
export function removeRecommend(params) {
  return request({
    url: "/system/recommend/remove",
    method: "get",
    params,
  });
}
lixiaomin committed
115 116 117 118 119 120 121 122 123

// 多选框下架
export function offGoods(data) {
  return request({
    url: "/system/shop/offGoods",
    method: "post",
    data: data
  });
}