<template>
	<view class="container">
		<view class="myHeader">
			<view class="backArrow">
				<text class="iconfont icon-youjiantou zuojiantou" style="left: 5rpx;" @click="goBack()"></text>
				<text style="font-size: 30rpx;">我的团队</text>
			</view>
			<view class="renshu">
				<view class="top">
					<view class="left">
						<text>团队有效人数</text>
					</view>
					<view class="right">
						<text>查看业绩</text>
					</view>
				</view>
				<view class="bottom">
					<text>18人</text>
				</view>
			</view>
			<view class="moneyBox">
				<view class="one">
					<view class="">
						￥799,999
					</view>
					<view style="margin-top: 5rpx;">
						<text>本月团队标准销售额</text>
					</view>
				</view>
				<view class="two">
					<view class="">
						150
					</view>
					<view style="margin-top: 5rpx;">
						<text>团队出单数</text>
					</view>
				</view>
			</view>
		</view>
		<view class="filterBox">
			<scroll-view class="scroll-view_H" scroll-x="true"  scroll-left="120">
				<view
					class="scroll-view-item_H uni-bg-blue" 
					v-for="item in tabList" 
					:key="item.id"
					:class="{active:item.id == currentFilter }"
					@click="currentFilter = item.id"
				>
					{{item.title}}
				</view>
			</scroll-view>
		</view>
		
		<!-- 之前的代码 -->
		<!-- <text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 20rpx;"></text> -->
		
		<!-- <view class="ulBox">
			<view v-for="item in minorMenuLists.filter(v=>v.isShow)" :key="item.title" @click="goteam(item)"
				class="liBox">
				<view class="infoBox">
					<text>{{item.title}}</text>
				</view>
				<view class="iconBox">
					<view class="" v-if="item.isType == 'text'">
						<text>{{item.contentType}}</text>
					</view>
					<i v-else class="iconfont icon-youjiantou iconStyle"></i>
				</view>
			</view>
		</view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tabList:[
					{title:'全部',id: '1'},
					{title:'直辖团队',id: '2'},
					{title:'所辖团队',id: '3'},
				],
				currentFilter:'1'
			}
		},
		methods: {
			goBack(){
				uni.navigateBack({
					delta: 1  
				});
			},
			goteam(item) {
				if(item.type===1){
					uni.navigateTo({
						url:`/pages/personalCenter/teamMembers/teamMembers`,
					})
				}else{
					uni.navigateTo({
						url:`/pages/personalCenter/teamPerformance/teamPerformance`,
					})
				}
			},
		},
		onLoad() {

		},
		mounted() {
		}
	}
</script>

<style lang="scss" scoped>
	.container{
		background-color: rgba(235, 239, 247, 1);
		display: flex;
		flex-direction: column;
		.myHeader{
			color: #fff;
			box-sizing: border-box;
			background: linear-gradient(225deg, rgba(65, 69, 188, 1) 0%, rgba(29, 30, 125, 1) 100%);
			.backArrow{
				box-sizing: border-box;
				display: flex;
				height: 60rpx;
				justify-content: space-between;
				align-items: center;
				position: relative;
				width: 100%;
				margin-bottom: 10rpx;
				color: #fff;
				margin-top: 20rpx;
				text:nth-child(2){
					width: 100%;
					text-align: center;
					position: absolute;
				}
			}
			.renshu{
				padding: 10rpx 25rpx;
				color: #fff;
				.top{
					display: flex;
					align-items: center;
					justify-content: space-between;
					font-size: 26rpx;
					.right{
						padding: 10rpx 15rpx;
						background-color: #fff;
						border-radius: 30rpx;
						color: rgba(32, 39, 155, 1);
						font-size: 25rpx;
					}
				}
				.bottom{
					font-size: 34rpx;
					font-weight: 500;
				}
			}
			.moneyBox{
				box-sizing: border-box;
				width: 100%;
				background-color: rgba(255,255,255,.15);
				padding:15rpx 20rpx;
				display: flex;
				align-items: center;
				justify-content: space-around;
				.one{
					font-size: 26rpx;
					text-align: center;
					width: 50%;
					position: relative;
				}
				.one::after{
					position: absolute;
					top: 50%;
					transform: translateY(-50%);
					right: 0;
					content: '';
					height: 40rpx;
					border: 1rpx dashed #fff;
					
				}
				.two{
					font-size: 26rpx;
					text-align: center;
					width: 50%;
				}
			}
		}
		.filterBox{
		    box-sizing: border-box;
			margin: 20rpx 0;
			width: 100%;
			background-color: #fff;
			padding: 20rpx 60rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			.scroll-view_H {
					white-space: nowrap;
					width: 100%;
					box-sizing: border-box;
				}
				.scroll-view-item {
					text-align: center;
					font-size: 36rpx;
				}
				.scroll-view-item_H {
					display: inline-block;
					margin-right: 20rpx;
					text-align: center;
					background: #f7f7f7;
					font-size: 27rpx;
					padding: 10rpx 20rpx;
					color: rgba(46, 38, 29, 1);
					border-radius: 8rpx;
					&.active{
						background: rgba(32, 39, 155, 1);
						color: #fff;
					}
				}
				.scroll-view-item_H:last-child{
					margin-right: 0rpx;
				}
				.filterItem{
					background: #f7f7f7;
					font-size: 27rpx;
					padding: 10rpx;
					color: rgba(46, 38, 29, 1);
					border-radius: 8rpx;
					&.active{
						background: rgba(32, 39, 155, 1);
						color: #fff;
					}
				}
		}
	}
	// 之前的样式
	// .ulBox {
	// 	padding: 0 30rpx;
	
	// 	.liBox {
	// 		display: flex;
	// 		align-items: center;
	// 		justify-content: space-between;
	// 		border-bottom: 1px solid #E6E6E6;
	// 		height: 92rpx;
	// 		margin-top: 20rpx;
	// 		.infoBox {
	// 			display: flex;
	// 			align-items: center;
	// 			font-size: 28rpx;
	// 			image {
	// 				width: 52rpx !important;
	// 				height: 52rpx;
	// 			}
	// 		}
	// 		& > view:first-child{
	// 			position: relative;
	// 			&::after{
	// 				content:'';
	// 				position: absolute;
	// 				left: 0;
	// 				bottom: -6rpx;
	// 				background: linear-gradient(90deg,#FA882F, #D9D9D9);
	// 				border-radius: 4rpx;
	// 				height: 8rpx;
	// 				width: 80rpx;
	// 			}
	// 		}
	// 		&:last-child {
	// 			border: none;
	// 		}
	// 	}
	// }
</style>