From e5fc8c8a5fe96ac02a0e3e40e8577a0a44334321 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Tue, 02 Sep 2025 15:03:11 +0800
Subject: [PATCH] feat:二维码调整
---
src/components/CreateQRcode/CreateQRcode.vue | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/components/CreateQRcode/CreateQRcode.vue b/src/components/CreateQRcode/CreateQRcode.vue
index 3131fcd..fba7454 100644
--- a/src/components/CreateQRcode/CreateQRcode.vue
+++ b/src/components/CreateQRcode/CreateQRcode.vue
@@ -4,6 +4,7 @@
</template>
<script setup>
+import { wgs84ToGcj02 } from '@/utils/coordinateTransformation';
import QRCode from 'qrcodejs2-fix'
const props = defineProps(['latAndLon'])
@@ -11,17 +12,16 @@
let qrCodeInstance = null
const createQRcode = content => {
-console.log('this.currentDetail.content',content);
-
+ const transformed = wgs84ToGcj02(content[0], content[1])
if (!content) return
if (qrCodeInstance) {
myQrCode.value.innerHTML = ''
}
// 生成新二维码
qrCodeInstance = new QRCode(myQrCode.value, {
- width: 92,
- height: 91,
- text: `https://uri.amap.com/marker?position=${content}&name=%E4%BA%8B%E4%BB%B6%E7%82%B9`,
+ width: 130,
+ height: 130,
+ text: `https://uri.amap.com/marker?position=${transformed}&name=%E4%BA%8B%E4%BB%B6%E7%82%B9`,
})
}
watch(
--
Gitblit v1.9.3