feat(i18n): 支持通过URL参数设置语言

- 新增从URL查询参数中读取lang值的功能
- 支持lang参数为zh或en时设置并存储语言
- 保留原有的本地存储语言获取逻辑作为备用方案
- 添加错误处理防止URL解析异常

chore(assets): 更新微信二维码图片路径

- 将about.html中的微信二维码图片地址改为相对路径
- 将index.html中的微信二维码图片地址改为相对路径
- 移除远程CDN备用加载逻辑,统一使用本地资源
This commit is contained in:
hehh
2025-11-26 17:18:54 +08:00
parent 9f0d3d0a2a
commit 747021c259
6 changed files with 19 additions and 3 deletions

View File

@@ -263,7 +263,7 @@
<div class="weixin-qrcode-container">
<div class="weixin-qrcode-title">扫描二维码</div>
<div class="weixin-qrcode-desc">请使用微信扫一扫添加关注</div>
<img src="https://blog-file.hehouhui.cn/wechat/mp-honesy.jpg" alt="微信二维码"
<img src="./images/mp-honesy.jpg" alt="微信二维码"
class="weixin-qrcode-image"
onerror="this.src='https://cdn.jsdmirror.com/gh/listener-He/Home/images/logo.png'; this.alt='二维码加载失败'">
<button class="weixin-qrcode-close" onclick="closeWeixin()">关闭</button>