Authored by wangtao

检查登录状态

@@ -651,17 +651,17 @@ layui.extend({ @@ -651,17 +651,17 @@ layui.extend({
651 connectFlg = false; 651 connectFlg = false;
652 if (location.hash.indexOf('#/user/login') == -1) { 652 if (location.hash.indexOf('#/user/login') == -1) {
653 //lsq 注释掉多无提示框 2022-08-28 653 //lsq 注释掉多无提示框 2022-08-28
654 - /* // 调用测试接口,出现过期则会跳转到登录页面 654 + // 调用测试接口,出现过期则会跳转到登录页面
655 try { 655 try {
656 -  
657 $.ajax({ 656 $.ajax({
658 url: domainName + "/api-web/common/test", 657 url: domainName + "/api-web/common/test",
659 type: "get", 658 type: "get",
660 async: false, 659 async: false,
661 success: function (res) { 660 success: function (res) {
662 - $('head').append('<style id="ew-tree-table-css">' + res + '</style>'); 661 + console.log("检查登录状态:",'正常')
663 }, 662 },
664 error:(error)=>{ 663 error:(error)=>{
  664 + console.error("检查登录状态:",error)
665 if(error.status === 401){ 665 if(error.status === 401){
666 window.top.location.reload(); 666 window.top.location.reload();
667 return; 667 return;
@@ -675,7 +675,7 @@ layui.extend({ @@ -675,7 +675,7 @@ layui.extend({
675 tryIndex = 1; 675 tryIndex = 1;
676 // 服务异常:服务重启,网络问题等不可访问等因素 676 // 服务异常:服务重启,网络问题等不可访问等因素
677 tryFunc(); 677 tryFunc();
678 - }*/ 678 + }
679 } else { 679 } else {
680 tryIndex = 1; 680 tryIndex = 1;
681 tryFunc(); 681 tryFunc();