refactor(custom): 地图服务商更换
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-06-16 17:56:39 +08:00
parent 646ba7165f
commit 68e02ecc84
2 changed files with 537 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
<script setup>
import api from '../api'
import Upload from '@/components/Upload.vue'
import TiandituPicker from '@/components/TiandituPicker.vue'
onMounted(() => {
getInfo()
@@ -114,6 +115,13 @@ window.addEventListener('message', (res) => {
showModal.value = false
})
const confirm = (data) => {
model.value.lt = `${data.latlng.lat},${data.latlng.lng}`
model.value.lat = data.latlng.lat
model.value.lon = data.latlng.lng
showModal.value = false
}
const submit = () => {
formRef.value?.validate(async (errors) => {
if (!errors) {
@@ -214,19 +222,14 @@ const submit = () => {
<!-- h5地图 -->
<n-modal v-if="showModal" v-model:show="showModal">
<n-card
style="width: 600px; height: 600px"
style="width: 600px; height: auto"
title="查找地图位置"
:bordered="false"
size="huge"
role="dialog"
aria-modal="true"
>
<iframe
src="https://apis.map.qq.com/tools/locpicker?type=1&key=4EJBZ-TZXCV-IHUPX-UMI2L-MK3N3-37FSQ&referer=myapp"
width="100%"
height="100%"
frameborder="0"
></iframe>
<TiandituPicker @confirm="confirm" @cancel="showModal = false" />
</n-card>
</n-modal>
</CommonPage>