41 lines
719 B
Vue
41 lines
719 B
Vue
<template>
|
|
<section class="openMap">
|
|
<div flex class="column" shrink @tap="handleOpenMap">
|
|
<img :src="`${$cdn}guardianship/seat.png`"/>
|
|
<span v-text="'地图/导航'"/>
|
|
</div>
|
|
</section>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: "openMap",
|
|
props: {
|
|
data: {default: () => ({})}
|
|
},
|
|
methods: {
|
|
handleOpenMap() {
|
|
let {lng, lat, gpsDesc} = this.data
|
|
location.href = `https://uri.amap.com/marker?callnative=1&position=${[lng, lat].toString()}&name=${gpsDesc}`
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.openMap {
|
|
flex-shrink: 0;
|
|
|
|
img {
|
|
width: 40px;
|
|
height: 40px;
|
|
}
|
|
|
|
span {
|
|
margin-left: 0;
|
|
color: #999;
|
|
font-size: 20px;
|
|
}
|
|
}
|
|
</style>
|