From 24f0eebcf7563294abd7357b2de7851d38ed8edb Mon Sep 17 00:00:00 2001 From: erio Date: Mon, 13 Apr 2026 14:06:44 +0800 Subject: [PATCH] fix(frontend): lower QR code error correction level to reduce density Closes #1607 --- frontend/src/components/payment/PaymentQRDialog.vue | 2 +- frontend/src/components/payment/PaymentStatusPanel.vue | 2 +- frontend/src/views/user/PaymentQRCodeView.vue | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/payment/PaymentQRDialog.vue b/frontend/src/components/payment/PaymentQRDialog.vue index 670c1cc5..c21ef029 100644 --- a/frontend/src/components/payment/PaymentQRDialog.vue +++ b/frontend/src/components/payment/PaymentQRDialog.vue @@ -154,7 +154,7 @@ async function renderQR() { await QRCode.toCanvas(qrCanvas.value, qrUrl.value, { width: 220, margin: 2, - errorCorrectionLevel: logoSrc ? 'H' : 'M', + errorCorrectionLevel: logoSrc ? 'M' : 'L', }) if (!logoSrc) return const canvas = qrCanvas.value diff --git a/frontend/src/components/payment/PaymentStatusPanel.vue b/frontend/src/components/payment/PaymentStatusPanel.vue index 087b3dcf..01269f64 100644 --- a/frontend/src/components/payment/PaymentStatusPanel.vue +++ b/frontend/src/components/payment/PaymentStatusPanel.vue @@ -199,7 +199,7 @@ async function renderQR() { if (!qrCanvas.value || !qrUrl.value) return await QRCode.toCanvas(qrCanvas.value, qrUrl.value, { width: 220, margin: 2, - errorCorrectionLevel: 'H', + errorCorrectionLevel: 'M', }) } diff --git a/frontend/src/views/user/PaymentQRCodeView.vue b/frontend/src/views/user/PaymentQRCodeView.vue index 50173a1a..0965947a 100644 --- a/frontend/src/views/user/PaymentQRCodeView.vue +++ b/frontend/src/views/user/PaymentQRCodeView.vue @@ -94,12 +94,12 @@ async function renderQR() { await nextTick() if (!qrCanvas.value || !qrUrl.value) return - // Use high error correction to support logo overlay + // Use medium error correction to support logo overlay while keeping QR code scannable const logoSrc = getLogoForType() await QRCode.toCanvas(qrCanvas.value, qrUrl.value, { width: 256, margin: 2, - errorCorrectionLevel: logoSrc ? 'H' : 'M', + errorCorrectionLevel: logoSrc ? 'M' : 'L', }) if (!logoSrc) return