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

@@ -306,7 +306,7 @@
<button class="modal-close" onclick="toggleWechat()"><i class="ri-close-line"></i></button>
<h3 data-i18n="modal.wechat">Official Account</h3>
<div class="qr-box">
<img src="https://blog-file.hehouhui.cn/wechat/mp-honesy.jpg" alt="WeChat QR" onerror="this.style.display='none';this.nextElementSibling.style.display='block'">
<img src="./images/mp-honesy.jpg" alt="WeChat QR" onerror="this.style.display='none';this.nextElementSibling.style.display='block'">
<!-- <div class="qr-fallback">QR Load Failed</div>-->
</div>
<p data-i18n="modal.desc">Scan to follow Tech Share</p>