Browse Source

提交

master
chenkainan 1 year ago
parent
commit
294bd5e69f
  1. 6
      pages.json
  2. 37
      subPackages/h5Web/h5Map.vue
  3. 17
      subPackages/h5Web/h5Web.vue

6
pages.json

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

37
subPackages/h5Web/h5Map.vue

@ -1,37 +0,0 @@
<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>

17
subPackages/h5Web/h5Web.vue

@ -31,6 +31,23 @@
uni.setStorageSync('oTherMiniprogramIsBack', 1) uni.setStorageSync('oTherMiniprogramIsBack', 1)
} }
}) })
}else 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'
// })
// }
// }
success: res => {
uni.setStorageSync('oTherMiniprogramIsBack', 1)
}
})
} }
} }
} }

Loading…
Cancel
Save