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 | 22 +++++++++++++++------- 1 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/api/productManage/product.js b/src/api/productManage/product.js index fc2a10d..fb8638d 100644 --- a/src/api/productManage/product.js +++ b/src/api/productManage/product.js @@ -3,21 +3,29 @@ // 浜у搧鍒楄〃 // export const getProductList = async (data) => { -// return await axios.get(`/api/p/getProductList`, { +// return await axios.get(`/api-srm/p/getProductList`, { // params: data // }) // } export function getProductList(data) { return request({ - url: "/api/p/getProductList", + 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 }) @@ -25,7 +33,7 @@ // 鍒犻櫎浜у搧 export function deleteProduct(data) { return request({ - url: "/api/p/deleteProduct", + url: "/api-srm/p/deleteProduct", method: "delete", data }) @@ -33,7 +41,7 @@ // 鏇存柊浜у搧 export function updateProduct(data) { return request({ - url: "/api/p/updateProduct", + url: "/api-srm/p/updateProduct", method: "put", data }) @@ -41,13 +49,13 @@ // 娣诲姞浜у搧鑾峰彇浜у搧鍒楄〃 // export const getProductListFromGrpc = async (data) => { -// return await axios.get(`/api/p/getProductListFromGrpc`, { +// return await axios.get(`/api-srm/p/getProductListFromGrpc`, { // params: data // }) // } export function getProductListFromGrpc(data) { return request({ - url: "/api/p/getProductListFromGrpc", + url: "/api-srm/p/getProductListFromGrpc", method: "get", params:data }) -- Gitblit v1.8.0