| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { wgs84ToGcj02 } from '@/utils/coordinateTransformation'; |
| | | import QRCode from 'qrcodejs2-fix' |
| | | const props = defineProps(['latAndLon']) |
| | | |
| | |
| | | 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`, |
| | | text: `https://uri.amap.com/marker?position=${transformed}&name=%E4%BA%8B%E4%BB%B6%E7%82%B9`, |
| | | }) |
| | | } |
| | | watch( |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { getSmallImg, getShowImg } from '@/utils/util'; |
| | | import { ElMessageBox, ElLoading } from 'element-plus'; |
| | | import { calculateDefaultRange } from '@/utils/util'; |
| | |
| | | }, |
| | | async handleQRCode (val){ |
| | | val.showQR = !val.showQR |
| | | console.log('this.currentDetailvvvvv',val); |
| | | |
| | | }, |
| | | async loadAMapScripts() { |
| | | try { |