From 3286b2af0a85f46644bc09cfb16171f4d399890d Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期五, 19 四月 2024 17:13:25 +0800 Subject: [PATCH] 跟换所有页面的接口前缀 --- src/api/productManage/product.js | 43 ++++++++++++++++++++++++++++++++++++------- 1 files changed, 36 insertions(+), 7 deletions(-) diff --git a/src/api/productManage/product.js b/src/api/productManage/product.js index 6a3f7af..fb8638d 100644 --- a/src/api/productManage/product.js +++ b/src/api/productManage/product.js @@ -1,16 +1,31 @@ import request from "@/common/untils/request.js" -import axios from "axios" +// import axios from "axios" // 浜у搧鍒楄〃 -export const getProductList = async (data) => { - return await axios.get(`/api/p/getProductList`, { - params: data +// export const getProductList = async (data) => { +// return await axios.get(`/api-srm/p/getProductList`, { +// params: data +// }) +// } +export function getProductList(data) { + return request({ + url: "/api-srm/p/getProductList", + method: "get", + params:data + }) +} +// 鏌ヨ鍗曟潯渚涘簲鍟嗘暟鎹� +export function getSupplierByNumber(data) { + return request({ + url: `/api-srm/s/getSupplierByNumber/${data}`, + method: "get", + data }) } // 鍒涘缓浜у搧 export function createProduct(data) { return request({ - url: "/api/p/createProduct", + url: "/api-srm/p/createProduct", method: "post", data }) @@ -18,7 +33,7 @@ // 鍒犻櫎浜у搧 export function deleteProduct(data) { return request({ - url: "/api/p/deleteProduct", + url: "/api-srm/p/deleteProduct", method: "delete", data }) @@ -26,8 +41,22 @@ // 鏇存柊浜у搧 export function updateProduct(data) { return request({ - url: "/api/p/updateProduct", + url: "/api-srm/p/updateProduct", method: "put", data }) } + +// 娣诲姞浜у搧鑾峰彇浜у搧鍒楄〃 +// export const getProductListFromGrpc = async (data) => { +// return await axios.get(`/api-srm/p/getProductListFromGrpc`, { +// params: data +// }) +// } +export function getProductListFromGrpc(data) { + return request({ + url: "/api-srm/p/getProductListFromGrpc", + method: "get", + params:data + }) +} -- Gitblit v1.8.0