<template>
	<view>
		<ucenter v-if="page=='ucenter'"></ucenter>
		<res v-if="page=='res'"></res>
		<view class="cu-bar tabbar bg-white shadow foot">
			<view class="action" :class="page=='ucenter'?'text-green':'text-gray'" @click="goPage" data-cur="ucenter">
				<view class="cuIcon-homefill"></view> 首页
			</view>
			<view class="action" :class="page=='res'?'text-green':'text-gray'" @click="goPage" data-cur="res">
				<view class="cuIcon-similar"></view> 发现
			</view>
			<view class="action text-gray add-action">
				<button class="cu-btn cuIcon-add bg-green shadow"></button>
				发布
			</view>
			<view class="action" :class="page=='protect'?'text-green':'text-gray'">
				<view class="cuIcon-my">
					<view class="cu-tag badge">99</view>
				</view>
				守护
			</view>
			<view class="action text-gray">
				<view class="cuIcon-card">
					<view class="cu-tag badge"></view>
				</view>
				时光
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				page: 'ucenter'
			}
		},
		onLoad: function(option) {
			//验证登录
			//this.Dever.checkLogin();
			//this.getList(1);
		},
		onShow: function() {},
		
		// 重新加载
		onPullDownRefresh: function() {
			
		},
		// 触底刷新
		onReachBottom: function() {
			//this.getList(2);
			//console.info(333);
		},
		methods: {
			goPage: function(e) {
				this.page = e.currentTarget.dataset.cur
			},
			
		}
	}
</script>

<style>

</style>

