Kaynağa Gözat

日报分享

zhujindu 7 ay önce
ebeveyn
işleme
bc01441fbb
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      src/components/share.vue

+ 2 - 2
src/components/share.vue

@@ -103,6 +103,7 @@ export default {
   },
   created() {},
   mounted() {
+    this.toastLoading(0, '生成中...', true);
     // 二维码
     this.creatQrCode();
     getReportImg({ reportId: this.reportId }).then((res) => {
@@ -113,7 +114,6 @@ export default {
         });
       }
     });
-    // this.toastLoading(0, '生成中...', true);
     // 使用Promise.all确保所有图片加载完成
     // const photos = this.reportTarget.photos;
     // const photoPromises = [];
@@ -192,7 +192,7 @@ export default {
     },
     htmlToCanvas() {
       html2canvas(this.$refs.shareContent, {
-        scale: 1,
+        scale: window.devicePixelRatio || 1,
         useCORS: true,
         allowTaint: false,
         backgroundColor: null,