From 1ea89b0c68778c8bf81832e470ea307a42e250e4 Mon Sep 17 00:00:00 2001 From: woody Date: Thu, 19 Jun 2025 16:28:16 +0800 Subject: [PATCH] =?UTF-8?q?feat(share):=20=E5=88=86=E4=BA=AB=E9=A1=B5?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/mine/share/index.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/mine/share/index.vue b/pages/mine/share/index.vue index 6847130..ed9ec7a 100644 --- a/pages/mine/share/index.vue +++ b/pages/mine/share/index.vue @@ -72,8 +72,7 @@ import html2canvas from 'html2canvas' import { getShareCode } from '@/config/share' import clTabbar from '@/components/cl-tabbar.vue' -import VConsole from 'vconsole' -const vConsole = new VConsole() + export default { name: 'ShareQRCode', components: { @@ -245,7 +244,8 @@ export default { useCORS: true, allowTaint: true, backgroundColor: null, - scale: Math.max(3, window.devicePixelRatio * 2), + scale: 2, + dpi: 400, logging: true, // 开启日志便于调试 width: element.offsetWidth, height: element.offsetHeight, @@ -257,7 +257,7 @@ export default { y: 0, }) .then(canvas => { - const dataUrl = canvas.toDataURL('image/png', 1.0) + const dataUrl = canvas.toDataURL('image/jpeg', 1) // 根据环境处理结果 if (this.isWechat) {