<template>
		<view class="index-header">
			<view class="item" :class="switNum==1?'active':''" @click="goColor()">
				Real Account
			</view>
			<view class="item" :class="switNum==2?'active':''" @click="goMoniColor()">
				Demo Account
			</view>
			</view>
</template>
<script>
	const COMPONENT_NAME = 'swit'
	export default {
		name: COMPONENT_NAME,
	    props:{
			switNum: {
				type: Number,
				default () {
					return  0
				}
			},
			
		},
		data() {
			return {
		switNum:1,
			}
		},
		computed: {
		
		},
		mounted() {
		
		},
		methods: {
goColor(){
	uni.reLaunch({
		url:'../../../pages/menu/color/index'
	})
},
goMoniColor(){
	uni.reLaunch({
		url:'../../../pages/menu/colorMoni/index'
	})
}
	
	},
	}
</script>


<style scoped lang="scss">

	.index-header{
		display: flex;
		align-items: center;
		justify-content: space-between;
		background-color: #300261;
		.item{
			width: 50%;
			text-align: center;
			font-size: 32rpx;
			color: rgba($color: #fff, $alpha: .5);
			line-height: 108rpx;
		}
	}
	.active{
		color: #FFFFFF !important;
		border-bottom: 4rpx solid #954DE3;
	}
	
</style>
