forked from p85126437/datagear
修复当登录超时后点击查询页面的查询按钮无响应的BUG
This commit is contained in:
parent
637cd54cc7
commit
d334d9197b
|
@ -3469,15 +3469,25 @@
|
|||
else
|
||||
{
|
||||
var rtPrefix = jqXHR.responseText.substr(0, 100);
|
||||
var dpnValue = null;
|
||||
|
||||
var dpnToken = "dg-page-name=\"";
|
||||
var dpnStartIdx = rtPrefix.indexOf(dpnToken);
|
||||
if(dpnStartIdx > -1)
|
||||
{
|
||||
dpnStartIdx = dpnStartIdx + dpnToken.length;
|
||||
var dpnEndIdx = rtPrefix.indexOf("\"", dpnStartIdx);
|
||||
dpnValue = (dpnEndIdx > dpnStartIdx ? rtPrefix.substring(dpnStartIdx, dpnEndIdx) : null);
|
||||
}
|
||||
|
||||
//响应为HTML操作消息的
|
||||
if(rtPrefix.indexOf("<!--HTML_OPERATION_MESSAGE-->") >= 0)
|
||||
if(dpnValue == "error")
|
||||
{
|
||||
$omp.html(jqXHR.responseText);
|
||||
hasResponseMessage = true;
|
||||
}
|
||||
//当登录超时后,列表页点击【查询】按钮,ajax响应可能会重定向到登录页,这里特殊处理
|
||||
else if(rtPrefix.indexOf("<!--LOGIN_PAGE-->") >= 0)
|
||||
else if(dpnValue == "login")
|
||||
{
|
||||
var url = ajaxSettings.url;
|
||||
|
||||
|
@ -3508,6 +3518,11 @@
|
|||
{
|
||||
$.tipError(thrownError);
|
||||
}
|
||||
//客户端连接出错
|
||||
else if(event && event.type=="ajaxError")
|
||||
{
|
||||
$.tipError("Error");
|
||||
}
|
||||
};
|
||||
|
||||
/**JSON内容类型常量*/
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
<#if isJsonResponse>
|
||||
<@writeJson var=operationMessage />
|
||||
<#else>
|
||||
<!--HTML_OPERATION_MESSAGE-->
|
||||
<#include "include/html_doctype.ftl">
|
||||
<html>
|
||||
<head>
|
||||
<meta dg-page-name="error" />
|
||||
<#include "include/html_head.ftl">
|
||||
<title><#include "include/html_title_app_name.ftl"><@spring.message code='error.errorOccure' /></title>
|
||||
</head>
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
* http://www.gnu.org/licenses/lgpl-3.0.html
|
||||
*
|
||||
-->
|
||||
<!--LOGIN_PAGE-->
|
||||
<#include "include/import_global.ftl">
|
||||
<#include "include/html_doctype.ftl">
|
||||
<html>
|
||||
<head>
|
||||
<meta dg-page-name="login" />
|
||||
<#include "include/html_head.ftl">
|
||||
${detectNewVersionScript?no_esc}
|
||||
<title><#include "include/html_title_app_name.ftl"><@spring.message code='login.login' /></title>
|
||||
|
|
Loading…
Reference in New Issue