* zin: support open page with post request.
This commit is contained in:
@@ -112,7 +112,7 @@ function openApp(url, code, options)
|
||||
'name="app-' + code + '"',
|
||||
'class="fade"',
|
||||
'allowfullscreen="true"',
|
||||
'src="' + $.createLink('index', 'app', 'url=' + btoa(url)) + '"',
|
||||
'src="' + $.createLink('index', 'app') + '"',
|
||||
'frameborder="no"',
|
||||
'allowtransparency="true"',
|
||||
'scrolling="auto"',
|
||||
@@ -124,6 +124,10 @@ function openApp(url, code, options)
|
||||
.append($iframe)
|
||||
.appendTo('#apps');
|
||||
|
||||
$iframe.on('ready.app', () =>
|
||||
{
|
||||
openApp(url, code, options);
|
||||
});
|
||||
iframe.onload = iframe.onreadystatechange = function(e)
|
||||
{
|
||||
const finishLoad = () => $iframe.removeClass('loading').addClass('in');
|
||||
@@ -131,6 +135,7 @@ function openApp(url, code, options)
|
||||
setTimeout(finishLoad, 10000);
|
||||
triggerAppEvent(openedApp.code, 'loadapp', [openedApp, e]);
|
||||
};
|
||||
return;
|
||||
}
|
||||
if(!url) url = openedApp.currentUrl;
|
||||
|
||||
|
||||
+6
-3
@@ -874,11 +874,14 @@
|
||||
{
|
||||
initZinbar();
|
||||
|
||||
if(window.defaultAppUrl)
|
||||
if(window.defaultAppUrl) loadPage(window.defaultAppUrl);
|
||||
if(isInAppTab)
|
||||
{
|
||||
loadPage(window.defaultAppUrl);
|
||||
const frameElement = window.frameElement;
|
||||
if(frameElement && parent.window.$) parent.window.$(frameElement).trigger('ready.app');
|
||||
}
|
||||
else if(DEBUG)
|
||||
|
||||
if(DEBUG)
|
||||
{
|
||||
if(window.zinDebug)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user