feat(share): 分享页调整

This commit is contained in:
woody 2025-06-19 16:28:16 +08:00
parent f0ba57a7a4
commit 1ea89b0c68
1 changed files with 4 additions and 4 deletions

View File

@ -72,8 +72,7 @@
import html2canvas from 'html2canvas' import html2canvas from 'html2canvas'
import { getShareCode } from '@/config/share' import { getShareCode } from '@/config/share'
import clTabbar from '@/components/cl-tabbar.vue' import clTabbar from '@/components/cl-tabbar.vue'
import VConsole from 'vconsole'
const vConsole = new VConsole()
export default { export default {
name: 'ShareQRCode', name: 'ShareQRCode',
components: { components: {
@ -245,7 +244,8 @@ export default {
useCORS: true, useCORS: true,
allowTaint: true, allowTaint: true,
backgroundColor: null, backgroundColor: null,
scale: Math.max(3, window.devicePixelRatio * 2), scale: 2,
dpi: 400,
logging: true, // 便 logging: true, // 便
width: element.offsetWidth, width: element.offsetWidth,
height: element.offsetHeight, height: element.offsetHeight,
@ -257,7 +257,7 @@ export default {
y: 0, y: 0,
}) })
.then(canvas => { .then(canvas => {
const dataUrl = canvas.toDataURL('image/png', 1.0) const dataUrl = canvas.toDataURL('image/jpeg', 1)
// //
if (this.isWechat) { if (this.isWechat) {