Browse Source

提交

master
chenkainan 1 year ago
parent
commit
cf074ecf86
  1. 6
      pages.json
  2. 37
      subPackages/h5Web/h5Map.vue
  3. 14
      subPackages/h5Web/h5Web.vue

6
pages.json

@ -299,6 +299,12 @@
"style": { "style": {
"navigationBarTitleText": "" "navigationBarTitleText": ""
} }
},
{
"path": "h5Web/h5Map",
"style": {
"navigationBarTitleText": ""
}
} }
] ]
}], }],

37
subPackages/h5Web/h5Map.vue

@ -0,0 +1,37 @@
<template>
<view></view>
</template>
<script>
export default {
data() {
return {
}
},
onShow() {
},
onLoad(option) {
let data = JSON.parse(option.data)
if(data && data.type == 'map') {
uni.openLocation({
longitude: Number(data.lon), //
latitude: Number(data.lat), //
name: data.address || data.title || data.name, //
address: data.address, //
complete: res => {
if(res.errMsg.indexOf("openLocation:ok") != -1) {
uni.switchTab({
url: '/pages/map/map'
})
}
}
})
}
}
}
</script>
<style>
</style>

14
subPackages/h5Web/h5Web.vue

@ -31,20 +31,6 @@
uni.setStorageSync('oTherMiniprogramIsBack', 1) uni.setStorageSync('oTherMiniprogramIsBack', 1)
} }
}) })
}else {
uni.openLocation({
longitude: Number(data.lon), //
latitude: Number(data.lat), //
name: data.address || data.title || data.name, //
address: data.address, //
complete: res => {
if(res.errMsg.indexOf("openLocation:ok") != -1) {
uni.switchTab({
url: '/pages/map/map'
})
}
}
})
} }
} }
} }

Loading…
Cancel
Save