lrf402788946 4 년 전
부모
커밋
5249bc31bb
6개의 변경된 파일455개의 추가작업 그리고 24개의 파일을 삭제
  1. 4 0
      pages/card/card.js
  2. 2 0
      pages/home/home.js
  3. 10 6
      pages/setting/setting.js
  4. 13 13
      pages/setting/setting.wxss
  5. 426 0
      utils/weapp-qrcode.js
  6. 0 5
      utils/weapp.qrcode.esm.js

+ 4 - 0
pages/card/card.js

@@ -148,12 +148,16 @@ Page({
     // 获取推荐人信息
     let data = app.globalData.userInfo;
     if (data) {
+      console.log('function in if');
       this.setData({ "form.recommend": data.name })
       this.setData({ "form.r_mobile": data.mobile })
     } else {
       let qrUrl = decodeURIComponent(options.q)
       let mobile = this.getQueryString(qrUrl, 'mobile');
       let name = this.getQueryString(qrUrl, 'name');
+      console.log('function in else');
+      console.log(`mobile:${mobile}`);
+      console.log(`name:${name}`);
       if (name && mobile) {
         this.setData({ "form.recommend": name })
         this.setData({ "form.r_mobile": mobile })

+ 2 - 0
pages/home/home.js

@@ -109,6 +109,8 @@ Page({
     })
   },
   onLoad: function () {
+    const videoUrl = `${app.globalData.publicUrl}/files/video/index-top.mp4`;
+    this.setData({ videoUrl })
     let data = app.globalData.userInfo;
     if (data) {
       this.setData({ userInfo: data })

+ 10 - 6
pages/setting/setting.js

@@ -2,7 +2,7 @@
 //获取应用实例
 const app = getApp()
 
-import drawQrcode from '../../utils/weapp.qrcode.esm';
+import QRCode from '../../utils/weapp-qrcode.js';
 Page({
   data: {
     userInfo: {},
@@ -56,11 +56,15 @@ Page({
   makeQRCode(template = 0) {
     let data = app.globalData.userInfo;
     const url = `${app.globalData.publicUrl}/htyd/wxcard?name=${data.name}&mobile=${data.mobile}`;
-    drawQrcode({
-      width: 125,
-      height: 125,
-      canvasId: `myQrcode${template}`,
+    var qrcode = new QRCode(`myQrcode${template}`, {
+      // usingIn: this,
       text: url,
-    })
+      width: 110,
+      height: 110,
+      padding: 3,
+      colorDark: "#000000",
+      colorLight: "#ffffff",
+      correctLevel: QRCode.CorrectLevel.L,
+    });
   }
 })

+ 13 - 13
pages/setting/setting.wxss

@@ -76,7 +76,7 @@
 .temOne .qrcode {
   width: 250rpx;
   height: 250rpx;
-  left: 33.5%;
+  left: 36%;
   z-index: 1;
 }
 
@@ -84,8 +84,8 @@
   width: 80rpx;
   height: 80rpx;
   position: absolute;
-  bottom: 50px;
-  left: 44%;
+  bottom: 60px;
+  left: 43%;
   border: 3px solid #fff;
   border-radius: 15rpx;
   z-index: 999;
@@ -108,8 +108,8 @@
   width: 280rpx;
   height: 250rpx;
   margin: 15rpx 0;
-  left: 8%;
-  top: 2%;
+  left: 17%;
+  top: 5%;
 }
 
 .temTwo .avatarUrl {
@@ -140,15 +140,15 @@
 .temThr .qrcode {
   width: 240rpx;
   height: 240rpx;
-  left: 34%;
+  left: 38%;
 }
 
 .temThr .avatarUrl {
   width: 80rpx;
   height: 80rpx;
   position: absolute;
-  left: 44%;
-  top: 40px;
+  left: 45%;
+  top: 28px;
   border: 3px solid #ffffff;
   border-radius: 10rpx;
   z-index: 999;
@@ -172,8 +172,8 @@
 
 .temFour .temFourImg {
   float: right;
-  height: 228rpx;
-  width: 120px;
+  height: 220rpx;
+  width: 110px;
   border: 3px solid #032eae;
 }
 
@@ -217,8 +217,8 @@
 
 .temFive .qrcode {
   width: 230rpx;
-  height: 220rpx;
-  left: 35%;
+  height: 230rpx;
+  left: 37%;
 }
 
 .temFive .avatarUrl {
@@ -226,7 +226,7 @@
   height: 70rpx;
   position: absolute;
   left: 45%;
-  top: 35px;
+  top: 31px;
   border: 3px solid #ffffff;
   border-radius: 10rpx;
   z-index: 999;

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 426 - 0
utils/weapp-qrcode.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 5
utils/weapp.qrcode.esm.js