fix: 修复扫一扫登录
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 47s

This commit is contained in:
sexygoat
2026-04-17 10:51:10 +08:00
parent 715e4f6f7d
commit 16a47c1229
2 changed files with 11 additions and 9 deletions

View File

@@ -124,12 +124,12 @@
doLogin();
};
const handleScanLogin = async () => {
const handleScanLogin = async () => {
// #ifdef H5
const ready = await initWxSdk();
console.log(ready);
if (!ready) {
uni.showToast({ title: '扫一扫功能暂不可用', icon: 'none' });
const result = await initWxSdk();
console.log('微信SDK初始化结果:', result);
if (!result.success) {
uni.showToast({ title: result.error || '扫一扫功能暂不可用', icon: 'none' });
return;
}
wx.scanQRCode({