<template>
	<view>
		<tm-menubars :homeUrl="homeurl"  :title="title">
		</tm-menubars>
	</view>
</template>

<script>
	export default{
		computed: {
			homeurl() {
				let url = ''
				let userInfo = this.$tm.vx.state().user.userInfo || {}
				let card_id  = this.$tm.vx.state().card.cardId
				if(userInfo.card_id){
					url = '/pages/index/index'
					return url
				}else{
					if (userInfo.vip<1) {
						url = '/pages/index/detail?card_id='+ card_id
						return url
					}else{
						url = '/pages/index/index'
						return url
					}					
				}
				return url
			}
		},
		props:{
			title:String
		},
		mounted() {
			this.$tm.theme.setTheme('primary');
		}
	}
</script>

<style>
</style>
