fix: H5本地运行白屏及登录获取验证码去除安全验证弹窗

- manifest.json: H5 devServer 关闭 https,修复本地开发 WDS 断连问题
- App.vue: 大屏跳转 pc.html 时动态推导路径前缀,兼容本地(/)和部署(/h5/)两种场景
- static/html/pc.html: iframe src 根据当前页面路径动态计算,修复本地白屏问题
- login/index.vue: 获取验证码直接调用接口,跳过前端安全验证弹窗(后端已注释校验)

Made-with: Cursor
This commit is contained in:
apple
2026-03-21 08:57:13 +08:00
parent ae8b866319
commit 788ee0c0c0
4 changed files with 71 additions and 59 deletions

View File

@@ -95,7 +95,11 @@
success(e) {
/* 窗口宽度大于420px且不在PC页面且不在移动设备时跳转至 PC.html 页面 */
if (e.windowWidth > 420 && !window.top.isPC && !/iOS|Android/i.test(e.system)) {
window.location.pathname = '/h5/static/html/pc.html';
const p = (window.location.pathname || '/').replace(/\/$/, '') || '/';
if (p.endsWith('/static/html/pc.html')) return;
/* 与 manifest h5.router.base 一致:根路径为 / 或子路径 /h5/ */
const h5Base = p.startsWith('/h5/') || p === '/h5' ? '/h5' : '';
window.location.pathname = `${h5Base}/static/html/pc.html`;
}
}
});