|
|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div style="position: relative;width: 86%; margin-left: 7%; margin-top: 12px" @click="handleCardClick">
|
|
|
- <img src="http://staticweb.hnthyy.cn/images/electronic-health-card.png"
|
|
|
+ <img src="http://staticweb.hnthyy.cn/images/hunan-dzjkk.png"
|
|
|
style="width: 100%">
|
|
|
<div style="position: absolute; bottom: 38px; left: 20px">
|
|
|
<div style="font-size: 24px;">
|
|
|
@@ -70,13 +70,37 @@ export default {
|
|
|
|
|
|
onMounted(() => {
|
|
|
if (props.cardInfo.healthCardId) {
|
|
|
- const canvas = qrcanvas({
|
|
|
- data: props.cardInfo.qrCodeText,
|
|
|
- size: 90,
|
|
|
- padding: 5,
|
|
|
- foreground: 'green',
|
|
|
- })
|
|
|
- document.getElementById(props.cardInfo.healthCardId).appendChild(canvas)
|
|
|
+
|
|
|
+ document.getElementById(props.cardInfo.healthCardId).innerHTML=''
|
|
|
+ const image = new Image();
|
|
|
+ image.src = 'http://staticweb.hnthyy.cn/images/dzjkklogo.png';
|
|
|
+ image.onload = () => {
|
|
|
+ const canvas = qrcanvas({
|
|
|
+ size: 90,
|
|
|
+ padding: 5,
|
|
|
+ data: props.cardInfo.qrCodeText,
|
|
|
+ foreground: 'green',
|
|
|
+ logo: {
|
|
|
+ w: 25,
|
|
|
+ h: 25,
|
|
|
+ x: 36,
|
|
|
+ y: 36,
|
|
|
+ image,
|
|
|
+ },
|
|
|
+ });
|
|
|
+ document.getElementById(props.cardInfo.healthCardId).appendChild(canvas)
|
|
|
+ };
|
|
|
+
|
|
|
+
|
|
|
+ // const canvas = qrcanvas({
|
|
|
+ // data: props.cardInfo.qrCodeText,
|
|
|
+ // size: 90,
|
|
|
+ // padding: 5,
|
|
|
+ // foreground: 'green',
|
|
|
+ // })
|
|
|
+ // document.getElementById(props.cardInfo.healthCardId).appendChild(canvas)
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
|