<template>
	<view class="container">
		<!-- 搜索框区域 -->
		<uv-row custom-style="margin: 10px 0px" gutter="10">
			<uv-col span="12">
				<view class="search">
					<view class="add">
						<image class="img" src="../../static/index/add.png" mode="aspectFit"></image>
					</view>
					<input class="inp" type="text" v-model="keywords" placeholder="请输入关键字搜索" />
					<view class="btnSearch" @click="searchHandler()">搜索</view>
				</view>
			</uv-col>
		</uv-row>

		<!-- 名宿列表区域 -->
		<uv-row justify="space-between" gutter="10">
			<uv-col span="6">
				<view class="item">
					<image class="item-img" src="../../static/search/img.png" mode="scaleToFill"></image>
					<view class="descrition">
						<text class="title">双溪镇抱朴小院</text>
						<view class="detail">
							<view class="price">
								<text class="txt1">¥180</text>
								<text class="txt2">起</text>
							</view>
							<text class="score">5.0分</text>
						</view>
					</view>
				</view>
			</uv-col>
			<uv-col span="6">
				<view class="item">
					<image class="item-img" src="../../static/search/img.png" mode="scaleToFill"></image>
					<view class="descrition">
						<text class="title">双溪镇抱朴小院</text>
						<view class="detail">
							<view class="price">
								<text class="txt1">¥180</text>
								<text class="txt2">起</text>
							</view>
							<text class="score">5.0分</text>
						</view>
					</view>
				</view>
			</uv-col>
		</uv-row>

		<view class="main">
			<view class="content"></view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			keywords: ''
		}
	},
	onLoad() {},
	methods: {
		searchHandler() {
			console.log(this.keywords)
		}
	}
}
</script>

<style lang="scss" scoped>
.container {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 750rpx;
	box-sizing: border-box;

	.search {
		display: flex;
		justify-content: space-between;
		align-items: center;
		width: 700rpx;
		height: 70rpx;
		opacity: 1;
		border-radius: 70px;
		border: 1px solid rgba(30, 125, 251, 1);

		.add {
			display: flex;
			justify-content: center;
			align-items: center;
			margin-left: 10rpx;
			width: 60rpx;
			font-size: 50rpx;
			height: 60rpx;
			line-height: 60rpx;
			color: rgba(30, 125, 251, 1);
			border-right: 1px solid #ddd;

			.img {
				width: 30rpx;
				height: 30rpx;
			}
		}

		.inp {
			height: 60rpx;
			line-height: 60rpx;
			flex-grow: 1;
			padding-left: 20rpx;
		}

		.btnSearch {
			width: 100rpx;
			text-align: center;
			margin-right: 10rpx;
			height: 60rpx;
			line-height: 60rpx;
			opacity: 1;
			font-size: 32rpx;
			font-weight: 400;
			height: 2rem;
			color: rgba(30, 125, 251, 1);
		}
	}

	.item {
		width: 340rpx;
		box-sizing: border-box;
		margin-bottom: 20rpx;

		.item-img {
			width: 100%;
			height: 350rpx;
			border-radius: 18rpx 18rpx 0 0;
			box-sizing: border-box;
		}

		.descrition {
			display: flex;
			flex-direction: column;
			width: 100%;
			border-radius: 0 0 18rpx 18rpx;
			box-sizing: border-box;
			background: rgba(255, 255, 255, 1);
			margin-top: -10rpx;

			.title {
				font-size: 28rpx;
				font-weight: 500;
				padding: 20rpx 20rpx 10rpx;
				color: rgba(0, 0, 0, 1);
			}

			.detail {
				display: flex;
				flex-direction: row;
				justify-content: space-between;
				padding: 0 20rpx 20rpx 20rpx;
				color: rgba(0, 0, 0, 1);

				.price {
					.txt1 {
						font-size: 36rpx;
						font-weight: 500;
						color: rgba(255, 87, 51, 1);
					}

					.txt2 {
						font-size: 24rpx;
						font-weight: 400;
						color: rgba(255, 87, 51, 1);
					}
				}

				.score {
					font-size: 24rpx;
					font-weight: 400;
					padding-top: 10rpx;
					color: rgba(166, 166, 166, 1);
				}
			}
		}
	}
}
</style>
