diff --git a/zyplayer-doc-db/src/main/resources/webjars/doc-db/js/common.js b/zyplayer-doc-db/src/main/resources/webjars/doc-db/js/common.js index bb1866c3..4c5d3f72 100644 --- a/zyplayer-doc-db/src/main/resources/webjars/doc-db/js/common.js +++ b/zyplayer-doc-db/src/main/resources/webjars/doc-db/js/common.js @@ -186,6 +186,12 @@ function ajaxTemp(url, dataSentType, dataReceiveType, paramsStr, successFunction }, complete : function(msg) { + if (msg.responseText.startWith("")) { + if (msg.responseText.indexOf("THIS_IS_LOGIN_PAGE_FLAG") > 0) { + Toast.error('操作失败,登录已失效,请登陆后重试', 3000); + return; + } + } if(typeof completeFunction == "function") { completeFunction(msg,id); } diff --git a/zyplayer-doc-dubbo/src/main/resources/webjars/doc-dubbo/js/common.js b/zyplayer-doc-dubbo/src/main/resources/webjars/doc-dubbo/js/common.js index 7af28afc..579ecac9 100644 --- a/zyplayer-doc-dubbo/src/main/resources/webjars/doc-dubbo/js/common.js +++ b/zyplayer-doc-dubbo/src/main/resources/webjars/doc-dubbo/js/common.js @@ -201,6 +201,18 @@ function ajaxTemp(url, dataSentType, dataReceiveType, paramsStr, successFunction }, complete : function(msg) { + if (msg.responseText.startWith("")) { + 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); } diff --git a/zyplayer-doc-grpc/src/main/resources/webjars/doc-grpc/js/common.js b/zyplayer-doc-grpc/src/main/resources/webjars/doc-grpc/js/common.js index 7af28afc..579ecac9 100644 --- a/zyplayer-doc-grpc/src/main/resources/webjars/doc-grpc/js/common.js +++ b/zyplayer-doc-grpc/src/main/resources/webjars/doc-grpc/js/common.js @@ -201,6 +201,18 @@ function ajaxTemp(url, dataSentType, dataReceiveType, paramsStr, successFunction }, complete : function(msg) { + if (msg.responseText.startWith("")) { + 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); } diff --git a/zyplayer-doc-manage/src/main/webapp/static/lib/mg/js/common.js b/zyplayer-doc-manage/src/main/webapp/static/lib/mg/js/common.js index d52a7d38..441218d0 100644 --- a/zyplayer-doc-manage/src/main/webapp/static/lib/mg/js/common.js +++ b/zyplayer-doc-manage/src/main/webapp/static/lib/mg/js/common.js @@ -229,7 +229,13 @@ function ajaxTemp(url, dataSentType, dataReceiveType, paramsStr, successFunction beforeSend : function() { }, - complete : function(msg) { + complete: function (msg) { + if (msg.responseText.startWith("")) { + if (!url.endWith('/logout') && msg.responseText.indexOf("THIS_IS_LOGIN_PAGE_FLAG") > 0) { + Toast.error('操作失败,登录已失效,请登陆后重试', 3000); + return; + } + } if(typeof completeFunction == "function") { completeFunction(msg,id); } diff --git a/zyplayer-doc-manage/src/main/webapp/static/manage/login.html b/zyplayer-doc-manage/src/main/webapp/static/manage/login.html index 21562086..f5439a20 100644 --- a/zyplayer-doc-manage/src/main/webapp/static/manage/login.html +++ b/zyplayer-doc-manage/src/main/webapp/static/manage/login.html @@ -4,6 +4,8 @@