<template>
	<view class="bar">
		<view class="barbox" @click="gogogo(1)">
			<view class="bar-img">
				<image v-show="actindex == 1" src="../../static/imgs/hometwo.png" mode=""></image>
				<image v-show="actindex != 1" src="../../static/imgs/homeone.png" mode=""></image>
			</view>
			<view class="">首页</view>
		</view>
<!--		<view class="barbox" @click="gogogo(2)">-->
<!--			<view class="bar-img">-->
<!--				<image v-show="actindex == 2" src="../../static/imgs/circlex.png" mode=""></image>-->
<!--				<image v-show="actindex != 2" src="../../static/imgs/circle.png" mode=""></image>-->
<!--			</view>-->
<!--			<view class="">预约中心</view>-->
<!--		</view>-->
		<view class="barbox" @click="gogogo(3)">
			<view class="bar-img">
				<image v-show="actindex == 3" src="../../static/imgs/mytwo.png" mode=""></image>
				<image v-show="actindex != 3" src="../../static/imgs/myone.png" mode=""></image>
			</view>
			<view class="">我的</view>
		</view>
		<!-- 		<view class="barbox" @click="gogogo(4)">
			<view class="bar-img">
				<image v-show="actindex == 4" src="../../static/imgs/fwx.png" mode=""></image>
				<image v-show="actindex != 4" src="../../static/imgs/fw.png" mode=""></image>
			</view>
			<view class="">服务</view>
		</view>
		<view class="barbox" @click="gogogo(5)">
			<view class="bar-img">
				<image v-show="actindex == 5" src="../../static/imgs/myx.png" mode=""></image>
				<image v-show="actindex != 5" src="../../static/imgs/my.png" mode=""></image>
			</view>
			<view class="">我的</view>
		</view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				actindex: 1,
			}
		},
		props: {
			msg: String
		},
		mounted() {
			this.actindex = this.msg
		},
		methods: {
			gogogo(id) {
				this.actindex = id
				if (id == 1) {
					uni.reLaunch({
						url: '/newPages/newIndex/index'
					})
				}
				if (id == 2) {
					uni.reLaunch({
						url: '/pages/reservation/reservation'
					})
				}
				if (id == 3) {

					uni.reLaunch({
						url: '/pages/my/my'
					})
				}
				if (id == 4) {
					uni.showToast({
						title: '暂未开发',
						icon: 'error'
					})
				}
				if (id == 5) {
					uni.showToast({
						title: '暂未开发',
						icon: 'error'
					})
				}
			}
		}
	}
</script>

<style scoped lang="scss">
	.bar {
		width: 100%;
		height: 68px;
		background-color: white;
		position: fixed;
		bottom: 0px;
		display: flex;
		align-items: center;
		justify-content: space-around;
		font-size: 12px;
		font-weight: 400;
		color: #666666;
		box-shadow: 0px -3px 13px 0px rgba(0, 0, 0, 0.1);
		// border-radius: 22px 22px 0px 0px;
	}

	.barbox {
		width: 33%;
		text-align: center;
	}

	.centerbox {
		width: 50px;
		height: 50px;
		background-color: white;
		border-radius: 50%;
		margin: 0 auto;
		margin-top: -30px;
		box-sizing: border-box;
		padding: 5px;


	}

	.qiu {
		width: 100%;
		height: 100%;
		border-radius: 50%;
		background: linear-gradient(135deg, #2FF7D3 0%, #2F72F7 100%);
		display: flex;
		align-items: center;
		justify-content: center;

		image {
			width: 20px;
			height: 20px;
		}

	}

	.bar-img {
		width: 25px;
		height: 25px;
		margin: 0px auto;

		image {
			width: 100%;
			height: 100%;
		}
	}
</style>
