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

@@ -396,45 +396,44 @@
this.keyCode +
Date.parse(new Date());
},
success(data) {
this.$refs.verify.hide()
getCodeApi()
.then(res => {
this.keyCode = res.data.key;
this.getCode(data);
})
.catch(res => {
this.$util.Tips({
title: res
});
success(data) {
if (this.$refs.verify) this.$refs.verify.hide()
getCodeApi()
.then(res => {
this.keyCode = res.data.key;
this.getCode(data);
})
.catch(res => {
this.$util.Tips({
title: res
});
},
code() {
let that = this
if (!that.protocol) {
this.inAnimation = true
return that.$util.Tips({
title: '请先阅读并同意协议'
});
},
code() {
let that = this
if (!that.protocol) {
this.inAnimation = true
return that.$util.Tips({
title: '请先阅读并同意协议'
});
}
if (!that.account) return that.$util.Tips({
title: '请填写手机号码'
});
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
title: '请输入正确的手机号码'
});
getCodeApi()
.then(res => {
that.keyCode = res.data.key;
that.getCode({ captchaVerification: '' });
})
.catch(res => {
that.$util.Tips({
title: res
});
}
if (!that.account) return that.$util.Tips({
title: '请填写手机号码'
});
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
title: '请输入正确的手机号码'
});
// getCodeApi()
// .then(res => {
// that.keyCode = res.data.key;
// that.getCode();
// })
// .catch(res => {
// that.$util.Tips({
// title: res
// });
// });
this.$refs.verify.show()
},
},
async getLogoImage() {
let that = this;
getLogo(2).then(res => {
@@ -568,12 +567,12 @@
});
that.sendCode();
})
.catch(res => {
this.$refs.verify.refresh()
that.$util.Tips({
title: res
});
.catch(res => {
if (this.$refs.verify) this.$refs.verify.refresh()
that.$util.Tips({
title: res
});
});
},
async submit() {
let that = this;