Merge branch dev/task-154894 of zentao/zentaopms (#13079)

This commit is contained in:
刘刚
2025-12-30 15:59:57 +08:00
committed by Gitfox
+19 -1
View File
@@ -2369,7 +2369,25 @@ function handleImportDocSnapshot(snapshot)
const requestType = config.requestType.toUpperCase();
const fixUrl = (url, method, paramList) =>
{
const link = $.parseLink(url, 'auto');
const replaceOrign = url => {
try
{
const urlObj = new URL(url);
if(urlObj.origin != location.origin)
{
urlObj.protocol = location.protocol;
urlObj.host = location.host;
return urlObj.toString();
}
return url;
}
catch
{
return url;
}
};
const link = $.parseLink(replaceOrign(url), 'auto');
if(link.requestType.toUpperCase() === requestType || method.toLowerCase() !== link.methodName.toLowerCase()) return url;
return $.createLink('doc', method, paramList.map((p, i) => [p, link.vars[i][1]]));
};