<template>
	<view>
		<u-tabbar :value="current?current:0" @change="tabbarChange" :fixed="true" :placeholder="false"
			:safeAreaInsetBottom="true" activeColor="#F1992D">
			<u-tabbar-item text="运动" icon="../../static/tabbar/运动.png"></u-tabbar-item>
			<u-tabbar-item text="发现" icon="../../static/tabbar/发现.png"></u-tabbar-item>
			<u-tabbar-item text="高校圈" icon="../../static/tabbar/圈子.png"></u-tabbar-item>
			<u-tabbar-item text="小队" icon="../../static/tabbar/队伍.png"></u-tabbar-item>
			<u-tabbar-item text="我的" icon="../../static/tabbar/我的.png"></u-tabbar-item>
		</u-tabbar>
	</view>
</template>

<script>
	export default {
		props: {
			current: Number
		},
		data() {
			return {
				list: [{
						path: "pages/sport/main"
					},
					{
						path: "pages/discover/main"
					},
					{
						path: "pages/post/post"
					},
					{
						path: "pages/team/main"
					},
					{
						path: "pages/my/main"
					}

				]
			};
		},
		methods: {
			tabbarChange(e) {
				uni.switchTab({
					url: '/' + this.list[e].path
				})
			}
		}
	}
</script>

<style lang="scss">

</style>