feat(web): add mobile download QR to landing page - #91
Merged
HansonL622 merged 1 commit intoAug 14, 2026
Merged
Conversation
| { question: "AI 的反馈可以替代老师吗?", answer: "UniSpeaking 用于日常练习和即时反馈,不替代专业教师、考试官方评分或正式语言诊断。" }, | ||
| ]; | ||
|
|
||
| const mobileDownloadUrl = "http://fir.qiniuapi.com/v1zyqajm?utm_source=fir&utm_medium=qr"; |
There was a problem hiding this comment.
[P1] 不要通过明文 HTTP 分发移动端安装入口
这里的新链接同时被写入可点击入口和二维码,但目标仅通过 http:// 返回下载页面;在 HTTPS 落地页点击后会降级到明文连接,网络中的攻击者可以替换页面、下载地址或安装说明。尝试同域 HTTPS 也无法作为替代,因为当前证书已过期且域名不匹配。由于这是引导用户安装移动应用的路径,请改用证书有效、受项目控制的 HTTPS 下载地址(或先跳转到项目自己的 HTTPS 页面),再重新生成二维码。
| .landing-device--mobile .landing-device__screen { width: 100%; height: 100%; padding: 44px 14px 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 17px; color: #1c1c1b; text-align: center; background: #f4f4f0; } | ||
| .landing-mobile-download { text-decoration: none; } | ||
| .landing-device--mobile img { width: 42px; height: 42px; margin-bottom: 15px; border-radius: 8px; } | ||
| .landing-device--mobile .landing-mobile-download__qr { width: 82px; height: 82px; padding: 6px; object-fit: contain; border: 1px solid #deded8; border-radius: 6px; background: #fff; image-rendering: pixelated; } |
There was a problem hiding this comment.
[P1] 保留二维码的四模块静区和整数缩放
这个源图没有 QR 规范要求的四模块白色静区,而这里在 box-sizing: border-box 下把 33×33 模块内容压到 68px(560px 以下为 46px),同时只留下约 3 个模块的白边并进行非整数缩放。我用提交的图片按这两个 CSS 尺寸渲染后,OpenCV 均无法检测或解码;把同一模块矩阵改为四模块静区、2px 整数缩放的 82px 图后即可立即解码。这样桌面端展示的“扫码下载”会在常见扫码器/摄像头上不可靠;请让资产自带四模块静区,并按整数模块尺寸渲染(或增大容器并相应调整移动断点)。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Testing
npm run build