|
@ -4,7 +4,7 @@ |
|
|
<view class="login-box flex_col flex_start"> |
|
|
<view class="login-box flex_col flex_start"> |
|
|
<image class="bg" src="../../static/images/index/index_bg.png" mode="aspectFit"></image> |
|
|
<image class="bg" src="../../static/images/index/index_bg.png" mode="aspectFit"></image> |
|
|
|
|
|
|
|
|
<view class="login-info flex_col" v-if="login"> |
|
|
|
|
|
|
|
|
<view class="login-info flex_col" v-if="hasLogin"> |
|
|
<text>{{userInfo.mobile||"-"}}</text> |
|
|
<text>{{userInfo.mobile||"-"}}</text> |
|
|
<text>您好!</text> |
|
|
<text>您好!</text> |
|
|
</view> |
|
|
</view> |
|
@ -20,11 +20,11 @@ |
|
|
|
|
|
|
|
|
<view class="item flex_row flex_start bg-white padding solid-bottom" @click="clickEvent"> |
|
|
<view class="item flex_row flex_start bg-white padding solid-bottom" @click="clickEvent"> |
|
|
<image src="../../static/images/index/index_cup.png" mode=""></image> |
|
|
<image src="../../static/images/index/index_cup.png" mode=""></image> |
|
|
<view class="text-m text-left">活动赛事{{hasLogin}}+{{userInfo.mobile}}</view> |
|
|
|
|
|
|
|
|
<view class="text-m text-left">活动赛事</view> |
|
|
<image src="../../static/images/index/arrow_right.png" mode=""></image> |
|
|
<image src="../../static/images/index/arrow_right.png" mode=""></image> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="item flex_row flex_start bg-white padding solid-bottom" v-if="login" @click="login=!login"> |
|
|
|
|
|
|
|
|
<view class="item flex_row flex_start bg-white padding solid-bottom" v-if="hasLogin" @click="logout"> |
|
|
<image src="../../static/images/index/index_logout.png" mode=""></image> |
|
|
<image src="../../static/images/index/index_logout.png" mode=""></image> |
|
|
<view class="text-m text-left" >退出登录</view> |
|
|
<view class="text-m text-left" >退出登录</view> |
|
|
<image src="../../static/images/index/arrow_right.png" mode=""></image> |
|
|
<image src="../../static/images/index/arrow_right.png" mode=""></image> |
|
@ -43,9 +43,6 @@ |
|
|
computed:{ |
|
|
computed:{ |
|
|
...mapState(['userInfo']), |
|
|
...mapState(['userInfo']), |
|
|
...mapGetters(['hasLogin']), |
|
|
...mapGetters(['hasLogin']), |
|
|
// hasLogin(){ |
|
|
|
|
|
// return this.$store.getters.hasLogin |
|
|
|
|
|
// } |
|
|
|
|
|
}, |
|
|
}, |
|
|
onLoad(parms) { |
|
|
onLoad(parms) { |
|
|
|
|
|
|
|
@ -54,26 +51,16 @@ |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
...mapActions(['getUserInfo']), |
|
|
|
|
|
|
|
|
...mapActions(['getUserInfo','logoutUser']), |
|
|
jumpPage(name){ |
|
|
jumpPage(name){ |
|
|
this.$Router.push({name:name}) |
|
|
this.$Router.push({name:name}) |
|
|
// this.$Router.pushTab('/pages/login/login') |
|
|
|
|
|
}, |
|
|
}, |
|
|
clickEvent(){ |
|
|
|
|
|
let that = this |
|
|
|
|
|
if(this.login)this.jumpPage('eventList'); |
|
|
|
|
|
else { |
|
|
|
|
|
uni.showModal({ |
|
|
|
|
|
title: '提示', |
|
|
|
|
|
content: '需要登录后才能查看,是否跳转去登录界面?', |
|
|
|
|
|
success: function (res) { |
|
|
|
|
|
if (res.confirm) { |
|
|
|
|
|
that.jumpPage('login'); |
|
|
|
|
|
} else if (res.cancel) { |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
async clickEvent(){ |
|
|
|
|
|
if(this.hasLogin)this.jumpPage('eventList'); |
|
|
|
|
|
else await this.$tools.showModal("该功能需要登录后才能查看,是否跳转去登录界面?",()=>{this.jumpPage('login')}) |
|
|
|
|
|
}, |
|
|
|
|
|
async logout(){ |
|
|
|
|
|
await this.$tools.showModal("真的要退出登录?",this.logoutUser) |
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|