Merge branch dev/task-154894 of zentao/zentaopms (#13079)
This commit is contained in:
@@ -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]]));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user