<!doctype html><html lang="zh-CN"><head><meta charset="utf-8"><base href="/"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="referrer" content="no-referrer"><title>出差日历 · 访问验证</title><style>body{margin:0;background:#f1f5f9;font:16px -apple-system,"Segoe UI","Microsoft YaHei",sans-serif;color:#0f172a;display:grid;min-height:100vh;place-items:center}.box{box-sizing:border-box;width:min(92vw,380px);background:white;padding:28px;border:1px solid #e2e8f0;border-radius:16px;box-shadow:0 8px 32px #0f172a12}h1{font-size:21px;margin:0 0 8px}p{color:#64748b;font-size:14px;line-height:1.6}input,button{box-sizing:border-box;width:100%;padding:12px;border-radius:9px;font:inherit}input{border:1px solid #cbd5e1;margin:8px 0 12px}button{border:0;background:#ea580c;color:white;font-weight:700;cursor:pointer}#msg{min-height:22px;color:#b91c1c;font-size:13px}</style></head><body><main class="box"><h1>出差日历</h1><p>请输入访问密码以查看个人位置记录。</p><form id="f"><label for="password">访问密码</label><input id="password" type="password" autocomplete="current-password" required autofocus><button>验证并进入</button></form><p id="msg" role="status"></p></main><script>'use strict';document.getElementById('f').addEventListener('submit',async function(e){e.preventDefault();const b=this.querySelector('button'),m=document.getElementById('msg');b.disabled=true;b.textContent='验证中…';m.textContent='';try{const r=await fetch('api/login',{method:'POST',credentials:'same-origin',headers:{'content-type':'application/json'},body:JSON.stringify({password:document.getElementById('password').value})});const j=await r.json();if(!r.ok)throw new Error(j.error||'验证失败');location.replace('./');}catch(x){m.textContent=x.message||'验证失败';}finally{b.disabled=false;b.textContent='验证并进入';}});</script></body></html>