<template>
	<div class="enter">
		<div class="enter-both">
			<div class="enter-title">
				<h4>
					<i class="iconfont icon-fanhui" @click="back()"></i>
					<span>企业认证</span>
				</h4>
				<ul class="title-ul">
					<li v-for="item,bot in lilist"   >
			    	<div :class="{white:bot==number}">
							<span>{{item.name}}</span>
							<i class="iconfont icon-arrowright"></i>
							<p v-show="bot==number"></p>
						</div>
					</li>
				</ul>
			</div>
		</div>
	</div>
</template>
<script>
	export default{
		data(){
			return{
				number:'',
				para:'',
				path:'',
				lilist:[
				{
					name:'企业信息',
					routes:'/enterprise/'

				},
				{
					name:'法人信息',
					routes:'/enterprise/legalinfor'
				},
				{
					name:'授权人信息',
					routes:'/enterprise/authortitle'
				}
				],
			}
		},
		watch:{
  		"$route":function(){
	  		this.goFuc();
	  	}
  	},
		mounted(){
			  this.goFuc();
		},
		methods:{
			goFuc(){
				if(this.$route.path=="/enterprise"){
         	this.number=0;
         	console.log(this.number)
        }
        else if(this.$route.path=="/enterprise/legalinfor"){
       		this.number=1;
       		console.log(this.number)
        }
       	else if(this.$route.path=="/enterprise/authortitle"){
	       	this.number=2;
	       	console.log(this.number)
				}
			},
			line(a){
        this.para = a;
     	},
	    back(){
	    	if(this.number==0){
          this.$router.push({path:'/myself'})
	    	}
	    	else if(this.number==1){
	    		this.$router.push({path:'/enterprise'})
	    	}
	    	else if(this.number==2){
	    		this.$router.push({path:'/enterprise/legalinfor'})
	    	}
	    }
		}
	}
</script>
<style scoped>
	.enter{
		.enter-both{
		  width: 100%;
			.enter-title{
				height: 4.041667rem;
				background: #60c0ff;
				width: 100%;
				 h4{
						text-align: center;
						color: #fff;
						font-size: 0.472222rem;
						padding: 0.541667rem 0;
						position: relative;
						.icon-fanhui{
							float: left;
							margin-left: 0.513889rem;
						}
					  span{
					  	margin-left: -0.513889rem;
					  }
					}				
				.title-ul{
					width: 8.777778rem;
					margin: 0 auto;
					font-size: 0.388889rem;				
					overflow: hidden;
					li{
						float: left;
						width: 33.33%;
						text-align: center;
					  div{
							color: #c6e5fa;
							 p{
									height: 0.055556rem;
									width: 0.416667rem;
									background: #fff;
									margin: 0 auto;
									margin-top: 0.166667rem;
									color: #fff;
							  }
						   .icon-arrowright{
								float: right;
								margin-right: -0.35rem;
								}					
						}			
					}		
					.white{
						color:#fff !important; 
					}
			  }		
			}
			
	}
}
</style>