howard преди 1 година
родител
ревизия
55b4f15385

+ 1 - 0
commit/requestPhp.js

@@ -2,6 +2,7 @@
2
 
2
 
3
 import {getPhpToken} from "../utils/readAppInfo"
3
 import {getPhpToken} from "../utils/readAppInfo"
4
 export let baseURL = 'https://testapi.hxxfb.com/'
4
 export let baseURL = 'https://testapi.hxxfb.com/'
5
+// export let baseURL = ''
5
 // 请求超出时间
6
 // 请求超出时间
6
 const timeout = 50000
7
 const timeout = 50000
7
 // const token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhcGkuaHh4ZmIuY29tIiwiYXVkIjoiYXBpLmh4eGZiLmNvbSIsImlhdCI6MTc0MDM3MTM1NSwibmJmIjoxNzQwMzcxMzU1LCJleHAiOjE3NTExNzEzNTUsImp0aSI6WzI5OCwibWVyIl19.j2f8VwdwWY4zBpcijHntzUZ9YUms2SxChaVsYf7KnPs"
8
 // const token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhcGkuaHh4ZmIuY29tIiwiYXVkIjoiYXBpLmh4eGZiLmNvbSIsImlhdCI6MTc0MDM3MTM1NSwibmJmIjoxNzQwMzcxMzU1LCJleHAiOjE3NTExNzEzNTUsImp0aSI6WzI5OCwibWVyIl19.j2f8VwdwWY4zBpcijHntzUZ9YUms2SxChaVsYf7KnPs"

+ 1 - 1
manifest.json

@@ -128,7 +128,7 @@
128
           }
128
           }
129
         },
129
         },
130
         "/gateway/api": {
130
         "/gateway/api": {
131
-          "target": "http://testapi.hxxfb.com",
131
+          "target": "https://testapi.hxxfb.com",
132
           "pathRewirte": {
132
           "pathRewirte": {
133
             //路径重写
133
             //路径重写
134
             "^/api": "/"
134
             "^/api": "/"

+ 39 - 11
shop/perating/activitecode.vue

@@ -18,7 +18,7 @@
18
       <view class="activite-card">
18
       <view class="activite-card">
19
         <image
19
         <image
20
           class="activite-card-logo"
20
           class="activite-card-logo"
21
-          src="https://cdn.bjtdba.com/vod/image/2025-02-18/20250218234259970.png"
21
+          src="./assets/xfb.png"
22
           mode=""
22
           mode=""
23
         ></image>
23
         ></image>
24
 
24
 
@@ -35,11 +35,11 @@
35
           </view>
35
           </view>
36
           <view class="activite-prompt-img">
36
           <view class="activite-prompt-img">
37
             <image
37
             <image
38
-              src="https://cdn.bjtdba.com/vod/image/2022-08-23/20220823141611538.png"
38
+              src="./assets/zfb.png"
39
               mode=""
39
               mode=""
40
             ></image>
40
             ></image>
41
             <image
41
             <image
42
-              src="https://cdn.bjtdba.com/vod/image/2022-08-23/20220823141556288.png"
42
+              src="./assets/wx.png"
43
               mode=""
43
               mode=""
44
             ></image>
44
             ></image>
45
           </view>
45
           </view>
@@ -54,7 +54,7 @@
54
         ></image>
54
         ></image>
55
         <view class="downLoad-text"> 保存图片 </view>
55
         <view class="downLoad-text"> 保存图片 </view>
56
       </view> -->
56
       </view> -->
57
-      <view class="downLoadButton" @click="clickGeneratePicture2">
57
+    <view class="downLoadButton" @click="clickGeneratePicture2">
58
         <image
58
         <image
59
           class="downLoad-image"
59
           class="downLoad-image"
60
           src="../../static/saveImage.png"
60
           src="../../static/saveImage.png"
@@ -62,7 +62,7 @@
62
         ></image>
62
         ></image>
63
         <view class="downLoad-text"> 保存图片 </view>
63
         <view class="downLoad-text"> 保存图片 </view>
64
       </view>
64
       </view>
65
-    </view>
65
+      </view>
66
     <!-- ************************* 海报画板 **********************-->
66
     <!-- ************************* 海报画板 **********************-->
67
     <view style="position: absolute; bottom: 10%; left: 0%" v-show="flag">
67
     <view style="position: absolute; bottom: 10%; left: 0%" v-show="flag">
68
       <l-painter
68
       <l-painter
@@ -125,11 +125,12 @@ export default {
125
     this.$nextTick(() => {
125
     this.$nextTick(() => {
126
       this.queryByKey();
126
       this.queryByKey();
127
     });
127
     });
128
-    this.qrcode_src = e.qrcode_src;
128
+    this.qrcode_src = e.qrcode_src.replace('https://cdn.bjtdba.com', '');
129
+    // this.qrcode_src = e.qrcode_src;
130
+    
129
     this.code_id = e.code_id;
131
     this.code_id = e.code_id;
130
   },
132
   },
131
   mounted() {
133
   mounted() {
132
-
133
   },
134
   },
134
   methods: {
135
   methods: {
135
 
136
 
@@ -335,7 +336,33 @@ export default {
335
         },
336
         },
336
       });
337
       });
337
     },
338
     },
339
+    async downloadImage() {
340
+      try {
341
+        // 获取 DOM 元素
342
+        const element = document.getElementById('huoquId');
343
+        // 使用 html2canvas 将 DOM 转为 canvas
344
+        const canvas = await html2canvas(element);
345
+        // 将 canvas 转为图片地址
346
+        const imageUrl = canvas.toDataURL('image/png');
347
+        // 触发下载
348
+        this.downloadFile(imageUrl, 'image.png');
349
+      } catch (error) {
350
+        console.error('生成图片失败:', error);
351
+      }
352
+    },
353
+    // 下载文件的方法
354
+    downloadFile(url, filename) {
355
+      const link = document.createElement('a');
356
+      link.href = url;
357
+      link.download = filename;
358
+      document.body.appendChild(link);
359
+      link.click();
360
+      document.body.removeChild(link);
361
+    },
338
     clickGeneratePicture2() {
362
     clickGeneratePicture2() {
363
+      this.downloadImage();
364
+
365
+      return;
339
       let _this = this;
366
       let _this = this;
340
       let fileName = "pension_分享海报.jpg";
367
       let fileName = "pension_分享海报.jpg";
341
       // this.drawCanvas();
368
       // this.drawCanvas();
@@ -345,7 +372,7 @@ export default {
345
       //     const imageUrl = canvas.toDataURL('image/png');
372
       //     const imageUrl = canvas.toDataURL('image/png');
346
       //     _this.saveImageData(imageUrl);
373
       //     _this.saveImageData(imageUrl);
347
       //   });
374
       //   });
348
-      //
375
+      // 
349
       if (this.qrcode_src == "") {
376
       if (this.qrcode_src == "") {
350
         uni.showToast({
377
         uni.showToast({
351
           title: "无生成二维码",
378
           title: "无生成二维码",
@@ -526,7 +553,7 @@ page {
526
     display: flex;
553
     display: flex;
527
     flex-direction: column;
554
     flex-direction: column;
528
     align-items: center;
555
     align-items: center;
529
-    background: url("https://cdn.bjtdba.com/vod/image/2022-08-23/20220823132549341.png")
556
+    background: url("./assets/bg.png")
530
       no-repeat;
557
       no-repeat;
531
     background-size: 100%;
558
     background-size: 100%;
532
     padding-bottom: 242rpx;
559
     padding-bottom: 242rpx;
@@ -535,7 +562,7 @@ page {
535
       width: 688rpx;
562
       width: 688rpx;
536
       margin-top: 154rpx;
563
       margin-top: 154rpx;
537
       height: 1053rpx;
564
       height: 1053rpx;
538
-      background: url("https://cdn.bjtdba.com/vod/image/2022-08-23/20220823134038776.png")
565
+      background: url("./assets/bg2.png")
539
         no-repeat;
566
         no-repeat;
540
       background-size: 100%;
567
       background-size: 100%;
541
       display: flex;
568
       display: flex;
@@ -549,7 +576,8 @@ page {
549
         position: absolute;
576
         position: absolute;
550
         top: -52rpx;
577
         top: -52rpx;
551
         left: 50%;
578
         left: 50%;
552
-        transform: translate(-50%, 0);
579
+        /* transform: translate(-50%, 0); */
580
+        margin-left: -72rpx;
553
       }
581
       }
554
 
582
 
555
       .activite-cardImg {
583
       .activite-cardImg {

BIN
shop/perating/assets/bg.png


BIN
shop/perating/assets/bg2.png


BIN
shop/perating/assets/wx.png


BIN
shop/perating/assets/xfb.png


BIN
shop/perating/assets/zfb.png