Commit Graph

3 Commits

Author SHA1 Message Date
cc
4c8c4360ad feat(weather): 起始页天气/定位细节完善
- 新增 Client/src/lib/amap.ts:高德 JS 定位封装
- weather.ts / useWeather.ts:带经纬度/城市请求,定位失败不兜底
- Server weather.rs:相应调整
- 文档同步;.gitignore 忽略本地 .codegraph 索引

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 20:45:39 +08:00
cc
f4342e7c82 docs: 天气定位失败时不兜底、不显示
线上不设 WEATHER_DEFAULT_LOCATION:高德定位失败即返回 failed,
不再回退默认城市、也不调和风,前端静默不显示。更新文档说明。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 20:35:54 +08:00
cc
a185e56c22 feat: 导航起始页 + 天气/定位 + 天气动态效果
起始页(StartPage)
- 极简玻璃风导航页作未登录首页:时段问候、Bing 默认可切换搜索、10 个快捷位、右下齿轮进登录
- 昼夜背景自动切换(light/dark),按天气图标码 + 本地时间判断
- 天气动态效果(WeatherFx canvas):雨/雪/雷,克制风格,尊重 reduced-motion

天气与定位(前后端)
- 后端 /api/web/weather:高德 IP 定位(城市+坐标) + 和风实时天气
- 和风用 JWT(EdDSA/Ed25519)认证,密钥走环境变量、仅后端持有
- 每日限流(高德 300、和风 900,北京 0 点归零) + 10 分钟按 IP 缓存
- 前端 useWeather + WeatherIcon(7 类极简 SVG)

导航与登录
- 浏览器返回键支持(History API);返回即登出
- 记住我:勾选存 localStorage、不勾存 sessionStorage,默认不勾

其他
- .gitignore 忽略 *.pem/*.env 等密钥
- 新增文档 docs/startpage-weather-location.md 及部署 spec/plan

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 20:13:18 +08:00