Files
dsh_shenxian/web/index.html
T

32 lines
846 B
HTML

<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>工作台</title>
</head>
<body>
<script>
;(async () => {
const res = await fetch('/api/auth/me')
if (!res.ok) {
location.href = '/login.html'
return
}
// 所有用户(admin/active)统一直达 DSH 会话窗口
try {
const r = await fetch('/api/dsh/enter', { method: 'POST' })
const b = await r.json().catch(() => ({}))
if (r.ok && b.kind === 'session' && b.url) {
location.href = b.url
return
}
} catch {
// fall through to desktop
}
location.href = '/desktop.html'
})()
</script>
</body>
</html>