@{ Layout = null; } <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>登入 | IBMS緊急應變系統</title> <!-- base css --> <link id="vendorsbundle" rel="stylesheet" media="screen, print" href="~/css/vendors.bundle.css"> <link id="appbundle" rel="stylesheet" media="screen, print" href="~/css/app.bundle.css"> <link id="mytheme" rel="stylesheet" media="screen, print" href="~/css/themes/cust-theme-15.css"> <link id="myskin" rel="stylesheet" media="screen, print" href="~/css/skins/skin-master.css"> <!-- Place favicon.ico in the root directory --> <link rel="apple-touch-icon" sizes="180x180" href="~/img/favicon/apple-touch-icon.png"> <link rel="icon" type="image/png" sizes="32x32" href="~/img/favicon/favicon-32x32.png"> <link rel="mask-icon" href="~/img/favicon/safari-pinned-tab.svg" color="#5bbad5"> <link rel="stylesheet" media="screen, print" href="~/css/page-login-alt.css"> <!-- Font Awesome --> <link href="~/lib/fontawesome-free/css/all.min.css" rel="stylesheet" /> <!-- icheck bootstrap --> <link href="~/lib/icheck-bootstrap/icheck-bootstrap.min.css" rel="stylesheet" /> <!-- Theme style --> </head> <body> <div class="blankpage-form-field"> <div class="page-logo m-0 w-100 align-items-center justify-content-center rounded border-bottom-left-radius-0 border-bottom-right-radius-0 px-4"> <div class="page-logo-link press-scale-down d-flex align-items-center"> <img src="/img/dome.png" width="50%" aria-roledescription="logo"> <span class="page-logo-text mr-1">IBMS緊急應變系統</span> </div> </div> <div class="card p-4 border-top-left-radius-0 border-top-right-radius-0"> <div style="font-size: 2rem">頁面跳轉中 <span class="spinner-border" role="status" aria-hidden="true"></span> </div> </div> </div> <video poster="~/img/backgrounds/clouds.png" id="bgvid" playsinline autoplay muted loop> <source src="~/media/video/cc.webm" type="video/webm"> <source src="~/media/video/cc.mp4" type="video/mp4"> </video> <!-- jQuery --> <script src="~/lib/jquery/dist/jquery.js"></script> <!-- Bootstrap 4 --> <script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script> <script src="~/js/vendors.bundle.js"></script> <script src="~/js/app.bundle.js"></script> </body> </html> <script> $(function () { var a = '@ViewBag.jwt'; localStorage.setItem('JWT-Authorization', a); if (a != undefined && a != null && a != "") { $.ajax({ method: "post", beforeSend: function (xhr) { xhr.setRequestHeader("Authorization", 'Bearer ' + '@ViewBag.jwt'); }, url: "/Login/CheckJwt", //data: send_data, xhrFields: { withCredentials: true }, //contentType: "application/json; charset=utf-8", //完成请求后触发。即在success或error触发后触发 complete: function (XMLHttpRequest, status) { if ('400' == XMLHttpRequest.status) { window.location.href = ""; } }, async: false, dataType: 'json', success: function (rel) { window.location = "/Home/Index/"; }, error: function (xhr, textStatus, thrownError) { alert(textStatus); } }); } }) </script>