fix: 修复获取BOM详情时未传递版本号导致数据串用的问题

This commit is contained in:
dxc
2026-03-06 10:30:04 +08:00
parent 14bfe44e46
commit 9c32733234

View File

@ -10,12 +10,15 @@ export function getBomList(params?: any) {
} }
// 获取BOM详情 // 获取BOM详情
export function getBomDetail(bomNo: string) { export function getBomDetail(bomNo: string, version?: string) {
// 去除首尾斜杠,保留中间斜杠并进行 URL 编码 // 去除首尾斜杠,保留中间斜杠并进行 URL 编码
const trimmed = bomNo.replace(/^\/+|\/+$/g, ''); const trimmed = bomNo.replace(/^\/+|\/+$/g, '');
const encoded = encodeURIComponent(trimmed); const encoded = encodeURIComponent(trimmed);
const url = version
? `/v1/bom/detail/${encoded}?version=${encodeURIComponent(version)}`
: `/v1/bom/detail/${encoded}`;
return request({ return request({
url: `/v1/bom/detail/${encoded}`, url,
method: 'get' method: 'get'
}) })
} }