Shiro 处理ajax请求 拦截登录超时 解决!

来源:互联网 发布:智慧旅游大数据平台 编辑:程序博客网 时间:2024/05/17 19:17

配置全局ajax配置
$.ajaxSetup({    complete:function(XMLHttpRequest,textStatus){          if(textStatus=="parsererror"){               $.messager.alert('提示信息', "登陆超时!请重新登陆!", 'info',function(){                   window.location.href = 'login.jsp';               });          } else if(textStatus=="error"){              $.messager.alert('提示信息', "请求超时!请稍后再试!", 'info');          }    }});

在js里面配置全局的ajax配置即可!
0 0
原创粉丝点击