* zin: story #54433, fix clone tab in chrome not work.

This commit is contained in:
sunhao
2024-04-03 20:47:35 +08:00
parent 34b2fd8cd6
commit 693c0ca2c6
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -2609,6 +2609,7 @@ class baseRouter
/* Remove these three params. */
unset($passedParams['onlybody']);
unset($passedParams['tid']);
unset($passedParams['zin']);
unset($passedParams['HTTP_X_REQUESTED_WITH']);
/* Check params from URL. */
+2 -2
View File
@@ -437,7 +437,7 @@
const isDebugRequest = DEBUG && selectors.length === 1 || selectors[0] === 'zinDebug()';
const ajaxOptions =
{
url: url,
url: url + (url.includes('?') ? '&zin=1' : '?zin=1'),
headers: {'X-ZIN-Options': JSON.stringify($.extend({selector: selectors, type: 'list'}, options.zinOptions)), 'X-ZIN-App': currentCode},
type: options.method || 'GET',
data: options.data,
@@ -481,7 +481,7 @@
}
if(Array.isArray(data))
{
if(!options.partial && !hasFatal) currentAppUrl = (response && response.url) ? response.url : url;
if(!options.partial && !hasFatal) currentAppUrl = (response && response.url) ? (response.url.split('?zin=')[0].split('&zin=')[0]) : url;
data.forEach((item, idx) => item.selector = selectors[idx]);
updatePerfInfo(options, 'renderBegin');
renderPage(data, options);