refactor(custom): 地图服务商更换
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user