storeBelieveInLight 1 år sedan
förälder
incheckning
db30d32a12
1 ändrade filer med 19 tillägg och 19 borttagningar
  1. 19 19
      shop/perating/activitecode.vue

+ 19 - 19
shop/perating/activitecode.vue

@@ -338,7 +338,7 @@ export default {
338 338
     clickGeneratePicture2() {
339 339
       let _this = this;
340 340
       let fileName = "pension_分享海报.jpg";
341
-      this.drawCanvas();
341
+      // this.drawCanvas();
342 342
       // const cardElement = document.getElementById('huoquId');
343 343
       // console.log(cardElement,"cardElement")
344 344
       // html2canvas(cardElement).then((canvas) => {
@@ -346,24 +346,24 @@ export default {
346 346
       //     _this.saveImageData(imageUrl);
347 347
       //   });
348 348
       //
349
-      // if (this.qrcode_src == "") {
350
-      //   uni.showToast({
351
-      //     title: "无生成二维码",
352
-      //     icon: "none",
353
-      //     duration: 2000,
354
-      //   });
355
-      //   return;
356
-      // }
357
-      // let fileUrl = decodeURIComponent(this.qrcode_src);
358
-      // if (window.android) {
359
-      //   window.android.downloadFile(fileName, fileUrl);
360
-      // } else {
361
-      //   uni.showToast({
362
-      //     title: "未检测到Android环境",
363
-      //     icon: "none",
364
-      //     duration: 2000,
365
-      //   });
366
-      // }
349
+      if (this.qrcode_src == "") {
350
+        uni.showToast({
351
+          title: "无生成二维码",
352
+          icon: "none",
353
+          duration: 2000,
354
+        });
355
+        return;
356
+      }
357
+      let fileUrl = decodeURIComponent(this.qrcode_src);
358
+      if (window.android) {
359
+        window.android.downloadFile(fileName, fileUrl);
360
+      } else {
361
+        uni.showToast({
362
+          title: "未检测到Android环境",
363
+          icon: "none",
364
+          duration: 2000,
365
+        });
366
+      }
367 367
     },
368 368
     // 保存图片
369 369
     saveImage() {