✨ feat: 机组管理迁移l2代码
This commit is contained in:
@@ -6,7 +6,13 @@ export default function createFetch(url) {
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
timeout: 10000
|
||||
timeout: 10000,
|
||||
// 自定义响应数据转换,处理大整数ID精度问题
|
||||
transformResponse: [data => {
|
||||
// 在JSON解析前将所有id数值转换为字符串,避免大整数精度丢失
|
||||
const modifiedData = data.replace(/"id":\s*(\d+)/g, '"id": "$1"');
|
||||
return JSON.parse(modifiedData);
|
||||
}]
|
||||
})
|
||||
|
||||
l2Request.interceptors.response.use(response => {
|
||||
|
||||
Reference in New Issue
Block a user