<template>
	<view>
		<!-- 搜索框 -->
		<view class="search-box">
			<view class="left-box">
				<view class="location">成都市</view>
				<view class="iconfont icon-triangledownfill"></view>
			</view>
			<view class="right-box">
				<image src="../../../static/chooseCade/biaoqing.png" mode=""></image>
				<input type="text" v-model="keyWords" placeholder="输入关键词" placeholder-style="font-size: 28rpx" />
			</view>
		</view>
		<!-- banner -->
		<view class="banner">
			<image src="https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3934629892,4080949712&fm=26&gp=0.jpg" mode=""></image>
		</view>
		<!-- 功能选项 -->
		<view class="menu">
			<view class="item" v-for="(item,index) in [1,2,3,4]" :key="index">
				<image src="https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=2612784038,1629336953&fm=26&gp=0.jpg" mode=""></image>
				<view class="title">全部会员</view>
			</view>
		</view>
		<!-- 会员数与访问量 -->
		<view class="flow-box">
			<view class="flow-common-item member">
				<view class="top-box">
					<view class="number">4285</view>
					<view v-if="0" class="unit">万</view>
				</view>
				<view class="bottom-box">
					<view class="title">会员数</view>
					<image class="member-logo" src="https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1824211699,1676049546&fm=15&gp=0.jpg" mode=""></image>
				</view>
			</view>
			<view class="flow-common-item browse">
				<view class="top-box">
					<view class="number" style="line-height: 50rpx;">15</view>
					<view v-if="1" class="unit">万</view>
				</view>
				<view class="bottom-box">
					<view class="title">访问量</view>
					<image class="member-logo" src="https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2252291903,4053747589&fm=26&gp=0.jpg" mode=""></image>
				</view>
			</view>
		</view>
		<!-- 内容 -->
		<view class="content">
			<view class="navbar">
				<view class="item" v-for="(item,index) in navbar" :key="index" @click="cureentNavbarIndex = index">
					<view class="name" :class="{'select' : cureentNavbarIndex == index}">{{item}}</view>
					<view v-if="cureentNavbarIndex == index" class="line"></view>
				</view>
			</view>
			<view class="nav-content">
				<view class="target-item" v-for="(item,index) in test" :key="index">
					<view class="top-info">
						<!-- 海报图片 -->
						<image class="poster" src="https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=2774666942,1767404907&fm=15&gp=0.jpg" mode=""></image>
						<!-- 置顶 -->
						<view class="top-btn">
							<!-- 置顶图片 -->
							<image src="../../../static/chooseCade/chooseCades.png" mode=""></image>
							<view class="text">置顶</view>
						</view>
						<!-- 浏览量 -->
						<view class="look-box">
							<image src="../../../static/chooseCade/biaoqing.png" mode=""></image>
							<view class="num">1580</view>
						</view>
						<!-- 位置 -->
						<view class="location-box">
							<image src="../../../static/chooseCade/biaoqing.png" mode=""></image>
							<view class="value">成都市 1.2km</view>
						</view>
					</view>
					<view class="bottom-info">
						<view class="user-info">
							<view class="name">小娟</view>
							<view class="common-info-box man">
								<image class="sex" src="../../../static/chooseCade/chooseCades.png" mode=""></image>
								<view class="age">24</view>
							</view>
							<view class="common-info-box member">VIP</view>
						</view>
						<view class="price-info">
							<view class="hourse">
								<image src="../../../static/chooseCade/biaoqing.png" mode=""></image>
								<view class="title">有房</view>
							</view>
							<view class="car">
								<image src="../../../static/chooseCade/biaoqing.png" mode=""></image>
								<view class="title">有车</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				keyWords: '',
				cureentNavbarIndex: 0,
				navbar: ['推荐','找男友','找女友','附近'],
				test: [1,2,3,4,5,6,7,8,9,10]
			}
		},
		
		methods: {
			
		}
	}
</script>

<style lang="scss" scoped>
	.search-box {
		width: 630rpx;
		height: 80rpx;
		background-color: #F8F8F8;
		border-radius: 20rpx;
		margin: 30rpx auto 0;
		display: flex;
		align-items: center;
		padding: 0 30rpx;
		.left-box {
			width: auto;
			height: 40rpx;
			font-size: 28rpx;
			font-weight: bold;
			color: #333;
			border-right: 1rpx solid #CCCCCC;
			padding: 0 30rpx;
			display: flex;
			align-items: center;
			flex-wrap: nowrap;
			.iconfont {
				font-size: 10rpx;
			}
		}
		.right-box {
			width: auto;
			height: 100%;
			display: flex;
			align-items: center;
			padding: 0 30rpx;
			image {
				width: 25rpx;
				height: 25rpx;
			}
			input {
				// width: 100%;
				margin-left: 20rpx;
			}
		}
	} 
	
	.banner {
		width: 690rpx;
		height: 300rpx;
		margin-top: 30rpx;
		padding: 0 30rpx;
		image {
			width: 100%;
			height: 100%;
			border-radius: 20rpx;
		}
	}

	.menu {
		width: 100%;
		height: 160rpx;
		display: flex;
		align-items: cneter;
		margin-top: 30rpx;
		.item {
			flex: 1;
			height: 100%;
			display: flex;
			flex-direction: column;
			align-items: center;
			image {
				width: 90rpx;
				height: 70rpx;
				margin-top: 20rpx;
			}
			.title {
				width: auto;
				height: 30rpx;
				font-size: 24rpx;
				color: #333;
				margin-top: 20rpx;
			}
		}
	}

	.flow-box {
		width: 100%;
		height: 170rpx;
		margin-top: 30rpx;
		padding: 0 30rpx;
		display: flex;
		.flow-common-item {
			width: 275rpx;
			height: 100%;
			background-color: #F8F8F8;
			border-radius: 20rpx;
			padding: 0 30rpx;
			.top-box {
				width: 100%;
				height: 56rpx;
				display: flex;
				align-items: flex-end;
				color: #333;
				margin-top: 30rpx;
				.number {
					font-size: 48rpx;
					font-weight: bold;
				}
				.unit {
					font-size: 28rpx;
				}
			}
			.bottom-box {
				width: 100%;
				height: 54rpx;
				display: flex;
				align-items: flex-end;
				justify-content: space-between;
				.title {
					font-size: 24rpx;
					color: #999;
				}
				.member-logo {
					width: 58rpx;
					height: 54rpx;
				}
				.browse-logo {
					width: 65rpx;
					height: 46rpx;
				}
			}
		}
		.member {
			margin-right: 20rpx;
		}
	}

	.content {
		width: 100%;
		margin-top: 50rpx;
		.navbar {
			display: flex;
			.item {
				height: 60rpx;
				flex: 1;
				line-height: 60rpx;
				text-align: center;
				position: relative;
				.name {
					font-size: 28rpx;
					color: #999;
				}
				.select {
					font-size: 36rpx;
					color: #333;
					font-weight: bold;
				}
				.line {
					width: 30rpx;
					height: 6rpx;
					background-color: #333;
					border-radius: 2rpx;
					position: absolute;
					left: 42%;
				}
			}
		}
		.nav-content {
			width: 690rpx;
			margin: 50rpx auto 0;
			display: flex;
			flex-wrap: wrap;
			.target-item {
				width: 335rpx;
				height: 590rpx;
				border-radius: 20rpx;
				overflow: hidden;
				background-color: #F8F8F8;
				margin-bottom: 20rpx;
				&:nth-child(2n) {
					margin-left: 20rpx;
				}
				.top-info {
					width: 100%;
					height: 445rpx;
					position: relative;
					.poster {
						width: 100%;
						height: 100%;
					}
					.top-btn {
						width: 56rpx;
						height: 30rpx;
						padding: 0 10rpx;
						border-radius: 10rpx;
						background: linear-gradient(90deg, #FB5A8C 0%, #F65D10 100%);
						position: absolute;
						left: 20rpx;
						top: 20rpx;
						display: flex;
						align-items: center;
						justify-content: space-between;
						image {
							width: 14rpx;
							height: 14rpx;
						}
						.text {
							font-size: 20rpx;
							color: #fff;
						}
					}
					.look-box {
						width: 60rpx;
						height: 68rpx;
						position: absolute;
						top: 20rpx;
						right: 16rpx;
						image {
							width: 40rpx;
							height: 34rpx;
						}
						.num {
							font-size: 20rpx;
							color: #fff;
							margin-top: 6rpx;
						}
					}
					.location-box {
						width: 140rpx;
						height: 30rpx;
						padding: 0 10rpx;
						position: absolute;
						right: 20rpx;
						bottom: 20rpx;
						background-color: #fff;
						border-radius: 10rpx;
						display: flex;
						align-items: center;
						justify-content: space-between;
						image {
							width: 14rpx;
							height: 14rpx;
						}
						.value {
							font-size: 20rpx;
							color: #333;
						}
					}
				}
				.bottom-info {
					width: 100%;
					.user-info {
						width: 295rpx;
						height: 45rpx;
						margin: 20rpx auto 0;
						display: flex;
						align-items: center;
						.name {
							font-size: 32rpx;
							color: #333;
							margin-right: 20rpx;
						}
						.common-info-box {
							width: 50rpx;
							height: 30rpx;
							border-radius: 15rpx;
							padding: 0 10rpx;
							display: flex;
							align-items: center;
							color: #fff;
							font-size: 20rpx;
							margin-right: 10rpx;
							.sex {
								width: 24rpx;
								height: 24rpx;
							}
						}
						.man {
							background-color: #0084FF;
						}
						.woman {
							background-color: #FE83AF;
						}
						.member {
							background-color: #DCC083;
							justify-content: center;
						}
					}
					.price-info {
						width: 295rpx;
						height: 40rpx;
						margin: 20rpx auto 0;
						display: flex;
						.hourse,.car {
							width: 70rpx;
							height: 40rpx;
							padding: 0 10rpx;
							border-radius: 20rpx;
							background-color: #fff;
							display: flex;
							align-items: center;
							justify-content: space-between;
							font-size: 20rpx;
							color: #333;
							margin-right: 15rpx;
							image {
								width: 20rpx;
								height: 20rpx;
							}
						}
					}
				}
			}
		}
		
	}
</style>
