登录失效提示
This commit is contained in:
@@ -186,6 +186,12 @@ function ajaxTemp(url, dataSentType, dataReceiveType, paramsStr, successFunction
|
||||
|
||||
},
|
||||
complete : function(msg) {
|
||||
if (msg.responseText.startWith("<!doctype html>")) {
|
||||
if (msg.responseText.indexOf("THIS_IS_LOGIN_PAGE_FLAG") > 0) {
|
||||
Toast.error('操作失败,登录已失效,请登陆后重试', 3000);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(typeof completeFunction == "function") {
|
||||
completeFunction(msg,id);
|
||||
}
|
||||
|
||||
@@ -201,6 +201,18 @@ function ajaxTemp(url, dataSentType, dataReceiveType, paramsStr, successFunction
|
||||
|
||||
},
|
||||
complete : function(msg) {
|
||||
if (msg.responseText.startWith("<!doctype html>")) {
|
||||
if (msg.responseText.indexOf("THIS_IS_LOGIN_PAGE_FLAG") > 0) {
|
||||
app.$confirm('操作失败,登录已失效,请登陆后重试', '提示', {
|
||||
confirmButtonText: '去登陆',
|
||||
cancelButtonText: '知道了',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
window.open("static/manage/login.html");
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(typeof completeFunction == "function") {
|
||||
completeFunction(msg,id);
|
||||
}
|
||||
|
||||
@@ -201,6 +201,18 @@ function ajaxTemp(url, dataSentType, dataReceiveType, paramsStr, successFunction
|
||||
|
||||
},
|
||||
complete : function(msg) {
|
||||
if (msg.responseText.startWith("<!doctype html>")) {
|
||||
if (msg.responseText.indexOf("THIS_IS_LOGIN_PAGE_FLAG") > 0) {
|
||||
app.$confirm('操作失败,登录已失效,请登陆后重试', '提示', {
|
||||
confirmButtonText: '去登陆',
|
||||
cancelButtonText: '知道了',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
window.open("static/manage/login.html");
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(typeof completeFunction == "function") {
|
||||
completeFunction(msg,id);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -200,6 +200,12 @@ function ajaxTemp(url, dataSentType, dataReceiveType, paramsStr, successFunction
|
||||
|
||||
},
|
||||
complete : function(msg) {
|
||||
if (msg.responseText.startWith("<!doctype html>")) {
|
||||
if (msg.responseText.indexOf("THIS_IS_LOGIN_PAGE_FLAG") > 0) {
|
||||
Toast.error('操作失败,登录已失效,请登陆后重试', 3000);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(typeof completeFunction == "function") {
|
||||
completeFunction(msg,id);
|
||||
}
|
||||
|
||||
@@ -215,9 +215,21 @@ function ajaxTemp(url, dataSentType, dataReceiveType, paramsStr, successFunction
|
||||
beforeSend : function() {
|
||||
|
||||
},
|
||||
complete : function(msg) {
|
||||
if(typeof completeFunction == "function") {
|
||||
completeFunction(msg,id);
|
||||
complete: function (msg) {
|
||||
if (msg.responseText.startWith("<!doctype html>")) {
|
||||
if (msg.responseText.indexOf("THIS_IS_LOGIN_PAGE_FLAG") > 0) {
|
||||
app.$confirm('操作失败,登录已失效,请登陆后重试', '提示', {
|
||||
confirmButtonText: '去登陆',
|
||||
cancelButtonText: '知道了',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
window.open("static/manage/login.html");
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (typeof completeFunction == "function") {
|
||||
completeFunction(msg, id);
|
||||
}
|
||||
},
|
||||
error : function(msg) {
|
||||
|
||||
Reference in New Issue
Block a user