|
|
@ -1,6 +1,6 @@ |
|
|
|
<template> |
|
|
|
<view class="content"> |
|
|
|
<web-view src="https://yandumap.sz-trip.com/"></web-view> |
|
|
|
<web-view :src="src"></web-view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
@ -8,11 +8,19 @@ |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
|
|
|
|
src: '' |
|
|
|
} |
|
|
|
}, |
|
|
|
onReady() { |
|
|
|
|
|
|
|
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: { |
|
|
|
|
|
|
|