59 lines
1.1 KiB
Vue
59 lines
1.1 KiB
Vue
|
|
<template>
|
||
|
|
<view>
|
||
|
|
<web-view src="/static/newMap.html"></web-view>
|
||
|
|
</view>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script>
|
||
|
|
let wv
|
||
|
|
export default {
|
||
|
|
data() {
|
||
|
|
return {
|
||
|
|
currentLocation: ''
|
||
|
|
}
|
||
|
|
},
|
||
|
|
methods: {
|
||
|
|
getPosition (e) {
|
||
|
|
console.log(e);
|
||
|
|
// this.currentLocation = e.detail.data[0].position
|
||
|
|
}
|
||
|
|
},
|
||
|
|
onReady() {
|
||
|
|
// #// #ifdef APP-PLUS
|
||
|
|
let currentWebview = this.$scope.$getAppWebview()
|
||
|
|
wv = currentWebview.children()[0]
|
||
|
|
wv.setStyle({ width: '0', height: '0' })
|
||
|
|
// #endif
|
||
|
|
},
|
||
|
|
onLoad() {
|
||
|
|
let that = this
|
||
|
|
setTimeout(() => {
|
||
|
|
if (that.currentLocation != '' && that.currentLocation != undefined) {
|
||
|
|
uni.redirectTo({
|
||
|
|
url: `/pages/addMeeting/addMeeting?location=${that.currentLocation}`
|
||
|
|
})
|
||
|
|
}
|
||
|
|
// else {
|
||
|
|
// console.log(123);
|
||
|
|
// uni.showToast({
|
||
|
|
// icon: 'none',
|
||
|
|
// title: '当前网络不佳,获取地址失败,请稍后再试!',
|
||
|
|
// success: () => {
|
||
|
|
// uni.redirectTo({
|
||
|
|
// url: '/pages/meeting/meeting'
|
||
|
|
// })
|
||
|
|
// }
|
||
|
|
// })
|
||
|
|
// }
|
||
|
|
}, 3000)
|
||
|
|
},
|
||
|
|
onShow() {
|
||
|
|
window.addEventListener('message', this.getPosition)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<style lang="scss">
|
||
|
|
|
||
|
|
</style>
|