45 lines
1.7 KiB
HTML
45 lines
1.7 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh-CN">
|
||
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<title>请稍候</title>
|
||
<link rel="icon" type="image/x-icon" href="/front/image/favicon.ico?v=1" />
|
||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
||
<meta http-equiv="Pragma" content="no-cache" />
|
||
<meta http-equiv="Expires" content="0" />
|
||
</head>
|
||
|
||
<body>
|
||
<!--
|
||
覆盖 CAS 原生 casGenericSuccessView.html:已有有效 TGT 后再访问 /login(无 service)
|
||
时,CAS 不再渲染默认"您已经成功登录中央认证系统"页,而是自动跳转到配置的默认落点
|
||
(custom.login.default-redirect-url,即 base.yunhaixingtong.com)。
|
||
跳转地址复用 /api/check-sso 的返回(跟随 Nacos 配置,不硬编码);接口异常时兜底。
|
||
-->
|
||
<script>
|
||
(function () {
|
||
var fallback = "https://base.yunhaixingtong.com";
|
||
try {
|
||
var xhr = new XMLHttpRequest();
|
||
xhr.open("GET", "/api/check-sso", true);
|
||
xhr.onreadystatechange = function () {
|
||
if (xhr.readyState !== 4) return;
|
||
try {
|
||
var resp = JSON.parse(xhr.responseText);
|
||
if (resp && resp.code == 0 && resp.data && resp.data.url) {
|
||
window.location.replace(resp.data.url);
|
||
return;
|
||
}
|
||
} catch (e) { /* 兜底 */ }
|
||
window.location.replace(fallback);
|
||
};
|
||
xhr.send();
|
||
} catch (e) {
|
||
window.location.replace(fallback);
|
||
}
|
||
})();
|
||
</script>
|
||
</body>
|
||
|
||
</html> |