zuozhengqing
2023-11-22 d4d5ee67c6c628498055ab3c9f3fc417117c4c9f
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
import request from "@/common/untils/request.js"
// import axios from "axios"
 
// 产品列表
// export const getProductList = async (data) => {
//   return await axios.get(`/api/p/getProductList`, {
//     params: data
//   })
// }
export function getProductList(data) {
  return request({
    url: "/api/p/getProductList",
    method: "get",
    params:data
  })
}
// 创建产品
export function createProduct(data) {
  return request({
    url: "/api/p/createProduct",
    method: "post",
    data
  })
}
// 删除产品
export function deleteProduct(data) {
  return request({
    url: "/api/p/deleteProduct",
    method: "delete",
    data
  })
}
// 更新产品
export function updateProduct(data) {
  return request({
    url: "/api/p/updateProduct",
    method: "put",
    data
  })
}
 
// 添加产品获取产品列表
// export const getProductListFromGrpc = async (data) => {
//   return await axios.get(`/api/p/getProductListFromGrpc`, {
//     params: data
//   })
// }
export function getProductListFromGrpc(data) {
  return request({
    url: "/api/p/getProductListFromGrpc",
    method: "get",
    params:data
  })
}