企微迁移智慧监护(手环)
This commit is contained in:
40
src/apps/AppGuardianship/component/openMap.vue
Normal file
40
src/apps/AppGuardianship/component/openMap.vue
Normal file
@@ -0,0 +1,40 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user