|
|
@ -18,9 +18,9 @@ |
|
|
|
<image src="../../static/images/index/arrow_right.png" mode=""></image> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="item flex_row flex_start bg-white padding solid-bottom" @click="jumpPage('eventList')"> |
|
|
|
<view class="item flex_row flex_start bg-white padding solid-bottom" @click="clickEvent"> |
|
|
|
<image src="../../static/images/index/index_cup.png" mode=""></image> |
|
|
|
<view class="text-m text-left">活动赛事</view> |
|
|
|
<view class="text-m text-left">活动赛事{{hasLogin}}+{{userInfo.mobile}}</view> |
|
|
|
<image src="../../static/images/index/arrow_right.png" mode=""></image> |
|
|
|
</view> |
|
|
|
|
|
|
@ -32,19 +32,20 @@ |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import { mapState } from 'vuex' |
|
|
|
import { mapState,mapActions,mapGetters } from 'vuex' |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
address:"", |
|
|
|
login:true |
|
|
|
login:false |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed:{ |
|
|
|
...mapState(['userInfo']), |
|
|
|
getUserInfo(){ |
|
|
|
return this.$store.state.userInfo.mobile |
|
|
|
} |
|
|
|
...mapGetters(['hasLogin']), |
|
|
|
// hasLogin(){ |
|
|
|
// return this.$store.getters.hasLogin |
|
|
|
// } |
|
|
|
}, |
|
|
|
onLoad(parms) { |
|
|
|
|
|
|
@ -52,10 +53,27 @@ |
|
|
|
onUnload() { |
|
|
|
|
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
...mapActions(['getUserInfo']), |
|
|
|
jumpPage(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) { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|