You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<template>
|
|
|
|
<view class="content">
|
|
|
|
<web-view :src="src"></web-view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
src: ''
|
|
|
|
}
|
|
|
|
},
|
|
|
|
onShow() {
|
|
|
|
// 必须登录
|
|
|
|
let userInfo = (uni.getStorageSync('userInfo') && JSON.parse(uni.getStorageSync('userInfo'))) || this.$store.state.user.userInfo || {}
|
|
|
|
if(userInfo.token) {
|
|
|
|
this.src = 'https://yandumap.sz-trip.com?token=' + userInfo.token
|
|
|
|
}else {
|
|
|
|
uni.navigateTo({
|
|
|
|
url: '/pages/login/login'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.content {
|
|
|
|
width: 100vw;
|
|
|
|
height: 100vh;
|
|
|
|
padding-bottom: env(safe-area-inset-bottom)
|
|
|
|
}
|
|
|
|
</style>
|