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.
 
 
 
 
 

54 lines
1.0 KiB

<template>
<view class="content">
</view>
</template>
<script>
export default {
data() {
return {
src: '',
isFlag: true
}
},
onHide() {
uni.setStorageSync('isFlag', false)
},
onShow() {
this.gotoMap()
},
// 导航栏点击事件
onTabItemTap() {
this.qdTracker('navButtonClick', {buttonName: '导览', buttonSort: '2'})
},
methods: {
gotoMap() {
// 必须登录
let userInfo = (uni.getStorageSync('userInfo') && JSON.parse(uni.getStorageSync('userInfo'))) || this.$store.state.user.userInfo || {}
if(userInfo.token) {
this.isFlag = uni.getStorageSync('isFlag')
if(this.isFlag) {
this.gotoPath('plugin://guide/index')
}else {
uni.switchTab({
url: '/pages/index/index'
})
}
}else {
this.$store.commit('changeLoginPath')
}
}
}
}
</script>
<style lang="scss" scoped>
.content {
width: 100vw;
height: 100vh;
padding-bottom: env(safe-area-inset-bottom);
padding-top: 100rpx;
text-align: center;
}
</style>