登录失效提示

This commit is contained in:
暮光:城中城
2019-04-11 20:08:05 +08:00
parent a6c1360593
commit 3bb18069ad
7 changed files with 60 additions and 4 deletions

View File

@@ -229,7 +229,13 @@ function ajaxTemp(url, dataSentType, dataReceiveType, paramsStr, successFunction
beforeSend : function() {
},
complete : function(msg) {
complete: function (msg) {
if (msg.responseText.startWith("<!doctype html>")) {
if (!url.endWith('/logout') && msg.responseText.indexOf("THIS_IS_LOGIN_PAGE_FLAG") > 0) {
Toast.error('操作失败,登录已失效,请登陆后重试', 3000);
return;
}
}
if(typeof completeFunction == "function") {
completeFunction(msg,id);
}

View File

@@ -4,6 +4,8 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>登录</title>
<!--登录页面标识不能删除和修改用于ajax判断302到登录页面-->
<!--THIS_IS_LOGIN_PAGE_FLAG-->
<link rel="stylesheet" type="text/css" href="../lib/mzui/css/mzui.min.css">
</head>