From 9d3f1aa7571cd532c0c27bf8376ebf4b2178a252 Mon Sep 17 00:00:00 2001
From: charles <981744753@qq.com>
Date: 星期三, 24 七月 2024 17:45:45 +0800
Subject: [PATCH] fix:解决srm之前改了域名,处理各种异常状态,跳转也会出现异常等问题。

---
 src/api/productManage/product.js |   51 ++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 44 insertions(+), 7 deletions(-)

diff --git a/src/api/productManage/product.js b/src/api/productManage/product.js
index 6a3f7af..d8a9be9 100644
--- a/src/api/productManage/product.js
+++ b/src/api/productManage/product.js
@@ -1,16 +1,39 @@
 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
+//   })
+// }
+// /api-srm/s/getSupplierProductList
+export function getProductListTwo(data) {
+  return request({
+    url: "/api-srm/s/getSupplierProductList",
+    method: "get",
+    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 +41,7 @@
 // 鍒犻櫎浜у搧
 export function deleteProduct(data) {
   return request({
-    url: "/api/p/deleteProduct",
+    url: "/api-srm/p/deleteProduct",
     method: "delete",
     data
   })
@@ -26,8 +49,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