Przeglądaj źródła

更新显示logo

lex 1 rok temu
rodzic
commit
cab068e87c

+ 7 - 9
src/components/TheQrCode/index.tsx

@@ -195,17 +195,15 @@ export default defineComponent({
         dotScale: this.dotScale,
         autoColor: toBoolean(this.autoColor),
         components: this.components
-      } as any
+      } as any;
       if (logoImg) {
-        obj.logoImg = logoImg + '?' + new Date().getTime()
+        obj.logoImage = logoImg + '?' + new Date().getTime();
       }
-      new AwesomeQR(obj)
-        .draw()
-        .then((dataUri: any) => {
-          console.log('🚀 ~ dataUri:', dataUri);
-          this.imgUrl = dataUri;
-          this.callback && this.callback(dataUri, this.qid);
-        });
+      new AwesomeQR(obj).draw().then((dataUri: any) => {
+        console.log('🚀 ~ dataUri:', dataUri);
+        this.imgUrl = dataUri;
+        this.callback && this.callback(dataUri, this.qid);
+      });
     }
   },
   render() {

+ 6 - 1
src/views/studentList/modals/noticeModal.tsx

@@ -247,7 +247,12 @@ export default defineComponent({
 
           <div class={styles.qrCodeContainer}>
             <div class={styles.codewrap}>
-              <TheQrCode margin={0} text={url.value} size={84} />
+              <TheQrCode
+                logoSrc={props.data.logo}
+                margin={0}
+                text={url.value}
+                size={84}
+              />
               {/* <img src={codewrap} class={styles.codewrapBg} alt="" /> */}
             </div>
             <div class={styles.codewrapSubmit}>请扫码报名</div>