<template>
	<view class="bg">
		<view class="cancat-nav flex-around">
			<view :class="['concat-nav-item',showType===0?'active':'']" @click="showType=0">
				<view>出行人信息</view>
				<view v-if="showType===0" class="active-bar"></view>
			</view>
			<view :class="['concat-nav-item',showType===1?'active':'']" @click="showType=1">
				<view>收货地址</view>
				<view v-if="showType===1" class="active-bar"></view>
			</view>
		</view>
		<view class="concat-detail">
			
		</view>
		
	</view>
</template>

<script>
	export default {
		name: "travelerList",
		data() {
			return {
				showType: 0
			};
		},
		onShow() {
			this.$nextTick(()=>{
				this.init()
			})
		},
		methods: {
			init () {
				if (this.showType === 0 && this.$refs.travelListVueRef) {
					this.$refs.travelListVueRef.getList()
				} else if (this.showType === 1 && this.$refs.selfPickupVueRef) {
					this.$refs.selfPickupVueRef.getList()
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.bg {
		position: relative;
		background: #F7F7F7;
		height: 100vh;
		overflow-x: hidden;
	}
	.cancat-nav{
		width: 100%;
		display: flex;
		height: 112rpx;
		flex-shrink: 0;
		.concat-nav-item{
			ffont-weight: 500;
			font-size: 35rpx;
			color: #000000;
			text-align: center;
		}
		.concat-nav-item.active{
			color: #000000;
		}
		.active-bar{
			width: 100%;
			height: 11rpx;
			background: #71B580;
		}
	}
	.concat-detail{
		flex: 1;
		height: 10rpx;
		overflow: hidden;
	}
</style>
