<template>
	<view class="page">

		<u-navbar ref="navbar" title="租车" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
			height='45'></u-navbar>
		<view class="cont">
			<u-mask :show="showchoose" :z-index='100' />
			<view class="ips_box">
				<view class="ipt">
					<view class="left">
						<view class="txt">
							文三数字生活...|
						</view>
						<view class="txt">
							09月02日取车|
						</view>
						<view class="txt">
							日租
						</view>
					</view>
					<view class="right" @click="showchoose=true">
						<image src="https://lxnapi.ccttiot.com/bike/img/static/uukFtL3r4DCAYPcUPsK0" mode=""></image>
					</view>
				</view>
			</view>
			<view class="price_sele">
				<view class="words">
					宁德
					<view class="iconfont icon-xiangxia1">

					</view>
				</view>
				<view class="choose_cont" v-if="false">
					<view class="tit">
						还取方式
					</view>
					<view class="type_box">
						<view class="type_li">
							免费送取车
						</view>
						<view class="type_li act1">
							免费送取车
							<image src="https://lxnapi.ccttiot.com/bike/img/static/uBvr7JGCkY1jWLT0pzIc" mode="">
							</image>
						</view>
					</view>
					<view class="tit" style="margin-top: 42rpx;">
						送取车距离
					</view>
					<view class="type_box">
						<view class="type_li">
							免费送取车
						</view>
						<view class="type_li act1">
							免费送取车
							<image src="https://lxnapi.ccttiot.com/bike/img/static/uBvr7JGCkY1jWLT0pzIc" mode="">
							</image>
						</view>
					</view>
					<view class="tit" style="margin-top: 42rpx;">
						日均价
					</view>
					<view class="type_box">
						<view class="type_li">
							免费送取车
						</view>
						<view class="type_li act1">
							免费送取车
							<image src="https://lxnapi.ccttiot.com/bike/img/static/uBvr7JGCkY1jWLT0pzIc" mode="">
							</image>
						</view>
					</view>
					<view class="btn_box">
						<view class="btn1">
							清除
						</view>
						<view class="btn2">
							完成
						</view>
					</view>
				</view>

			</view>

			<view class="choose_card" v-if="showchoose">

				<view class="area_li">
					<view class="city">
						<view class="txt">
							取车城市
						</view>
						<view class="words">
							价格服务
							<image src="https://lxnapi.ccttiot.com/bike/img/static/uJkuBFsHACP6tnUo5nYm" mode="">
							</image>
						</view>
					</view>
					<view class="area" @click="getMapLocation()">
						<view class="top">
							<view class="txt">
								取车城市
							</view>
							<view class="type">
								距最近店铺727m
							</view>
						</view>
						<view class="bot">
							福鼎市太姥山镇...
							<image src="https://lxnapi.ccttiot.com/bike/img/static/uJkuBFsHACP6tnUo5nYm" mode="">
							</image>
						</view>
					</view>
					<view class="dingw">
						当前位置
						<image src="https://lxnapi.ccttiot.com/bike/img/static/unTHfCN5IgnVKDbadsFp" mode=""></image>
					</view>
				</view>
				<view class="time_box">
					<view class="time_li">
						<view class="txt">
							取车时间
						</view>
						<view class="words">
							09月2日 今天
							<image src="https://lxnapi.ccttiot.com/bike/img/static/uJkuBFsHACP6tnUo5nYm" mode="">
							</image>
						</view>
					</view>
					<view class="time_li">
						<view class="txt">
							选择租车周期
						</view>
						<view class="words">
							时租
							<image src="https://lxnapi.ccttiot.com/bike/img/static/uJkuBFsHACP6tnUo5nYm" mode="">
							</image>
						</view>
					</view>
				</view>
				<view class="btn_li">
					<view class="btns" @click="showchoose=false">
						关闭
					</view>
					<view class="btn" @click="tosele()">

						确定
					</view>
				</view>


			</view>
			<!-- <image class="kefu" src="https://lxnapi.ccttiot.com/bike/img/static/u8osHvZfHL7u3lbveVXx" mode=""></image> -->
			<map class="map" id="map" ref="map" :scale="zoomSize" :latitude="latitude" :longitude="longitude"
				:show-location="true" :markers="markers" :polygons="polyline">

			</map>
			<view class="choosedata" v-if="false">
				<view class="tit">
					请选择租车周期
					<image src="https://lxnapi.ccttiot.com/bike/img/static/uLzTHCbE6TTRPYj6rv8X" mode=""></image>
				</view>
				<view class="li">
					时租
				</view>
				<view class="li act">
					时租
				</view>
				<view class="li">
					时租
				</view>
				<view class="li">
					时租
				</view>
				<view class="li">
					时租
				</view>
				<view class="li">
					时租
				</view>
			</view>
			<view class="bot_cont">
				<view class="fresh">
					<image src="https://lxnapi.ccttiot.com/bike/img/static/u3HPoZMHrFlRW1vAwLDT" mode=""></image>
				</view>
				<view class="mini_store" v-if="false">
					<view class="store_li" v-for="item in 3" :key="item">
						<view class="store_top">
							<view class="store_name">
								云行租车（汇丰公寓）
							</view>
							<view class="img">
								<image src="https://lxnapi.ccttiot.com/bike/img/static/urOQKI1de3VSckSrotNW" mode="">
								</image>
							</view>
						</view>
						<view class="store_address">
							<view class="iconfont icon-ditufuwu">

							</view>2.3km | 天目山路148号
						</view>
						<view class="store_info">
							<view class="infos">
								<view class="info_li">
									<view class="data">
										<span>营业时间 |</span> 06:00 - 23:00
									</view>
									<view class="price">
										日均￥<span>69</span>起
									</view>
								</view>
								<view class="info_li">
									<view class="type">
										免费送取车
									</view>
									<view class="num">
										3辆车可租
									</view>
								</view>
							</view>
							<view class="img">
								<image src="https://lxnapi.ccttiot.com/bike/img/static/uagLIpV6ZNz0RCTEXKRB" mode="">
								</image>
							</view>
						</view>
						<view class="line"></view>
						<view class="car_li">
							<view class="car">
								<view class="imgs">
									<image src="https://lxnapi.ccttiot.com/bike/img/static/ugqn6cdklXtHgERyLHMq"
										mode=""></image>
								</view>
								<view class="infos">
									<view class="info_top">
										适合打卡出行
									</view>
									<view class="price">
										日均￥69
									</view>
								</view>
							</view>
							<view class="lines"></view>
							<view class="car">
								<view class="imgs">
									<image src="https://lxnapi.ccttiot.com/bike/img/static/ugqn6cdklXtHgERyLHMq"
										mode=""></image>
								</view>
								<view class="infos">
									<view class="info_top">
										适合打卡出行
									</view>
									<view class="price">
										日均￥69
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>
				<view class="normal_store">
					<view class="store_info">
						<view class="top_info">
							<view class="name">
								云行租车（汇丰公寓）
							</view>
							<view class="img">
								<image src="https://lxnapi.ccttiot.com/bike/img/static/urOQKI1de3VSckSrotNW" mode="">
								</image>
							</view>
						</view>
						<view class="address">
							<view class="iconfont icon-ditufuwu">
							
							</view>2.3km | 萧山区萧山机场交通中心停车库B4层B区B-137号车位
						</view>
						<view class="time">
							<span>营业时间 | </span>	 06:00 - 23:00
						</view>
						<view class="type">
							免费送取车
						</view>
					</view>
					<view class="card_box">
						<view class="card" v-for="item  in 3" :key="index">
							<image src="https://lxnapi.ccttiot.com/bike/img/static/ugqn6cdklXtHgERyLHMq" mode=""></image>
							<view class="infos">
								<view class="name">
									全新车网红泡泡50KM续航
								</view>
								<view class="cartool">
									手机开关锁 | 定位防盗
								</view>
								<view class="car_type_li">
									<view class="type">
										含电池
									</view>
								</view>
								<view class="price_box">
									<view class="left">
										剩余<span>9</span>辆
									</view>
									<view class="right">
										日租￥ <span>69</span>
										<view class="btn">
											立即租
										</view>
									</view>
									
								</view>
							</view>
							
						</view>
					</view>
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				bgc: {
					backgroundColor: '#fff'
				},
				sn: '',
				showchoose: false,
				CouponLists: [],
				hight: 0,
				latitude: 39.916527,
				longitude: 116.397128,
				isMap: false,
				zoomSize: 15,
				markers: [],
				polyline: [],
				polygons: [],

			}
		},
		onShow() {
			this.$nextTick(() => {
				const query = uni.createSelectorQuery().in(this);
				query.select('.ips_box').boundingClientRect(data => {

					this.hight = data.height + 45
					console.log('	 height:', this.hight);
				}).exec();


			});
		},
		methods: {

		}
	}
</script>

<style lang="scss">
	page {
		background-color: #F7F7F7;
	}

	.page {
		width: 100%;
		position: relative;

		.bot_cont {
			position: fixed;
			bottom: 0;
			width: 100%;

			.fresh {
				margin-left: 22rpx;
				width: 66rpx;
				height: 66rpx;
			}
			.normal_store{
				width: 100%;
				background: #fff;
				.card_box{
					.card{
						padding: 28rpx 36rpx;
						display: flex;
						flex-wrap: nowrap;
						align-items: center;
						border-bottom: 1rpx solid #808080;
						image{
							width: 172rpx;
							height: 132rpx;
						}
						.infos{
							width: 100%;
							margin-left: 30rpx;
							.name{
								font-weight: 600;
								font-size: 28rpx;
								color: #3D3D3D;
							}
							.cartool{
								margin-top: 16rpx;
								font-weight: 400;
								font-size: 24rpx;
								color: #3D3D3D;
							}
							.car_type_li{
								margin-top: 16rpx;
								display: flex;
								.type{
									padding: 4rpx 10rpx;
									background: #DCEDFF;
									border-radius: 6rpx 6rpx 6rpx 6rpx;
									font-weight: 400;
									font-size: 24rpx;
									color: #4297F3;
								}
							
							}
							.price_box{
								width: 100%;
								display: flex;
								flex-wrap: nowrap;
								align-items: center;
								justify-content: space-between;
								.left{
									font-weight: 400;
									font-size: 24rpx;
									color: #FF1C1C;
									span{
										font-size: 48rpx;
									}
								}
								.right{
									display: flex;
									flex-wrap: nowrap;
									align-items: center;
									margin-left: auto;
									font-weight: 400;
									font-size: 24rpx;
									color: #FF1C1C;
									span{
										font-size: 48rpx;
									}
									.btn{
										margin-left: 28rpx;
										display: flex;
										align-items: center;
										justify-content: center;
										width: 138rpx;
										height: 50rpx;
										background: #F14C4C;
										border-radius: 31rpx 31rpx 31rpx 31rpx;
										font-weight: 500;
										font-size: 24rpx;
										color: #FFFFFF;
									}
								}
							}
						}
					}
				}
				.store_info{
					display: flex;
					flex-wrap: wrap;
					width: 100%;
					padding: 30rpx 28rpx;
					box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(0,0,0,0.1);
					.top_info{
						width: 100%;
						display: flex;
						flex-wrap: nowrap;
						align-items: center;
						justify-content: space-between;
						.name{
							font-weight: 600;
							font-size: 36rpx;
							color: #3D3D3D;
						}
						.img{
							width: 48rpx;
							height: 48rpx;
						}
					}
					.address{
						margin-top: 12rpx;
						width: 100%;
						display: flex;
						align-items: center;
						flex-wrap: nowrap;
						font-weight: 400;
						font-size: 24rpx;
						color: #3D3D3D;
					
					}
					.time{
						width: 100%;
						margin-top: 8rpx;
						font-weight: 500;
						font-size: 24rpx;
						color: #3D3D3D;
						span{
							font-weight: 600;
						}
					}
					.type{
						margin-top: 18rpx;
						padding: 4rpx 10rpx;
						background: #DCEDFF;
						border-radius: 6rpx 6rpx 6rpx 6rpx;
						font-weight: 400;
						font-size: 24rpx;
						color: #4297F3;
					}
				}
			}
		
			.mini_store::-webkit-scrollbar {
				display: none;
			}

			.mini_store {
				// width: 100%; // 确保 mini_store 宽度为100%占满可用空间
				margin-left: 22rpx;
				display: flex;
				flex-wrap: nowrap;
				margin-bottom: 28rpx;
				overflow-x: auto; // 添加水平滚动条
				// margin-bottom: 200rpx;
				white-space: nowrap; // 确保子元素不换行

				.store_li {
					padding: 24rpx;
					display: inline-block; // 确保元素水平排列
					min-width: 670rpx; // 使用 min-width 保证滑动效果
					height: 340rpx;
					background: #ffffff;
					// box-shadow: 0rpx 2rpx 18rpx 0rpx rgba(0, 0, 0, 0.3);
					border-radius: 22rpx;
					flex-shrink: 0; // 防止元素缩小
					margin-right: 10rpx; // 添加右侧间距

					.car_li {
						margin-top: 2rpx;
						display: flex;
						align-items: center;

						.car {
							display: flex;
							align-items: center;
							flex-wrap: nowrap;
							width: 49%;

							.imgs {
								width: 100rpx;
								height: 76rpx;
							}

							.infos {
								margin-left: 24rpx;

								.info_top {
									font-weight: 600;
									font-size: 28rpx;
									color: #3D3D3D;
								}

								.price {
									font-weight: 400;
									font-size: 24rpx;
									color: #3D3D3D;
								}
							}
						}

						.lines {
							height: 94rpx;
							width: 1rpx;
							background: #D8D8D8;
						}
					}

					.line {
						margin-top: 22rpx;
						width: 100%;
						border: 1rpx solid #D8D8D8;
					}

					.store_info {
						display: flex;
						flex-wrap: nowrap;
						align-items: center;

						.infos {
							margin-top: 8rpx;
							flex-grow: 1; // 让 .infos 占据剩余的宽度

							.info_li {
								display: flex;
								flex-wrap: nowrap;
								justify-content: space-between;

								.data {
									font-weight: 400;
									font-size: 24rpx;
									color: #3D3D3D;

									span {
										font-weight: 600;
									}
								}

								.price {
									font-weight: 400;
									font-size: 24rpx;
									color: #FF1C1C;

									span {
										font-size: 36rpx;
									}
								}

								.type {
									padding: 4rpx 8rpx;
									background: #DCEDFF;
									border-radius: 6rpx 6rpx 6rpx 6rpx;
									font-weight: 400;
									font-size: 24rpx;
									color: #4297F3;
								}

								.num {
									font-weight: 400;
									font-size: 28rpx;
									color: #3D3D3D;
								}
							}
						}

						.img {
							margin-left: auto;
							margin-left: 16rpx;
							width: 48rpx;
							height: 48rpx;
						}
					}

					.store_top {
						width: 100%;
						display: flex;
						flex-wrap: nowrap;
						align-items: center;
						justify-content: space-between;

						.store_name {
							font-weight: 600;
							font-size: 36rpx;
							color: #3D3D3D;
						}

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

					}

					.store_address {
						margin-top: 12rpx;
						display: flex;
						flex-wrap: nowrap;
						align-items: center;
						font-weight: 400;
						font-size: 24rpx;
						color: #3D3D3D;

						.icon-ditufuwu {

							margin-right: 6rpx;
						}
					}
				}
			}
		}

		.map {
			position: relative;
			width: 750rpx;
			height: 78vh;


		}

		.cont {
			position: relative;

			.price_sele {
				position: relative;

				width: 750rpx;
				background: #FFFFFF;

				.choose_cont {

					position: absolute;
					background: #fff;
					width: 750rpx;
					// height: 200rpx;
					// left: -58rpx;
					z-index: 100;
					padding-bottom: 40rpx;

					.tit {
						margin: 0 58rpx;
						font-weight: 400;
						font-size: 28rpx;
						color: #3D3D3D;
					}

					.type_box {
						margin: 0 58rpx;
						display: flex;
						margin-top: 16rpx;

						.type_li {
							position: relative;
							margin-right: 10rpx;
							padding: 8rpx 16rpx;
							background: #F0F0F0;
							border-radius: 8rpx 8rpx 8rpx 8rpx;
							font-weight: 400;
							font-size: 24rpx;
							color: #3D3D3D;

							image {
								position: absolute;
								right: 0;
								bottom: 0;
								width: 28rpx;
								height: 28rpx;
							}
						}

						.act1 {
							background: #DCEDFF;
							color: #4297F3;
						}
					}

					.btn_box {
						position: absolute;
						bottom: -140rpx;
						margin-top: 50rpx;
						width: 750rpx;
						height: 140rpx;
						background: #FFFFFF;
						box-shadow: 0rpx -2rpx 22rpx 0rpx rgba(0, 0, 0, 0.1);
						border-radius: 0 0 40rpx 40rpx;
						display: flex;
						align-items: center;
						justify-content: center;

						.btn1 {
							display: flex;
							align-items: center;
							justify-content: center;
							width: 240rpx;
							height: 78rpx;
							border-radius: 10rpx 10rpx 10rpx 10rpx;
							border: 2rpx solid #4297F3;
							font-weight: 400;
							font-size: 36rpx;
							color: #4297F3;
						}

						.btn2 {
							margin-left: 44rpx;
							display: flex;
							align-items: center;
							justify-content: center;
							width: 382rpx;
							height: 78rpx;
							background: #4297F3;
							border-radius: 10rpx 10rpx 10rpx 10rpx;
							border: 2rpx solid #4297F3;
							font-weight: 400;
							font-size: 36rpx;
							color: #FFFFFF;
						}
					}
				}

				.words {
					padding: 18rpx 58rpx;
					display: flex;
					flex-wrap: nowrap;
					// margin-top: 6rpx;
					font-weight: 600;
					font-size: 28rpx;
					color: #3D3D3D;

					.icon-xiangxia1 {
						margin-left: 4rpx;
						margin-top: 4px;
						font-size: 22rpx;
					}

				}

			}

			.choosedata {
				padding: 46rpx 37rpx;
				position: fixed;
				bottom: 0;
				width: 750rpx;
				// height: 757rpx;
				background: #FFFFFF;
				border-radius: 20rpx 20rpx 0 0;
				z-index: 101;

				.tit {
					margin-bottom: 54rpx;
					position: relative;
					width: 100%;
					text-align: center;
					font-weight: 600;
					font-size: 40rpx;
					color: #3D3D3D;

					image {
						position: absolute;
						right: 36rpx;
						width: 52rpx;
						height: 52rpx;
					}
				}



				.li {
					margin-bottom: 24rpx;
					display: flex;
					flex-wrap: nowrap;
					align-items: center;
					justify-content: center;
					width: 676rpx;
					height: 88rpx;
					background: #F7F7F7;
					border-radius: 14rpx 14rpx 14rpx 14rpx;
					border: 2rpx solid #fff;
					font-weight: 600;
					font-size: 36rpx;
					color: #3D3D3D;
				}

				.act {

					background: #DCEDFF;

					border: 2rpx solid #4297F3;
				}
			}

			.ips_box {
				padding: 22rpx 38rpx 0 38rpx;
				width: 750rpx;
				background: #FFFFFF;
				border-radius: 0rpx 0rpx 0rpx 0rpx;

				.ipt {
					display: flex;
					flex-wrap: nowrap;
					align-items: center;
					justify-content: space-between;
					padding: 20rpx 30rpx;
					width: 100%;
					background: #EFEFEF;
					border-radius: 39rpx 39rpx 39rpx 39rpx;

					.left {
						display: flex;
						flex-wrap: nowrap;
						align-items: center;

						.txt {
							font-weight: 400;
							font-size: 24rpx;
							color: #6F6F6F;
						}
					}

					.right {
						width: 32rpx;
						height: 32rpx;

						image {
							width: 32rpx;
							height: 32rpx;
						}
					}
				}
			}






			.choose_card {
				position: absolute;
				top: 0;
				padding-bottom: 28rpx;


				width: 750rpx;
				// height: 511rpx;
				background: #FFFFFF;
				border-radius: 0rpx 0rpx 20rpx 20rpx;
				z-index: 100;

				.check {
					margin-bottom: 40rpx;
					display: flex;
					flex-wrap: nowrap;
					align-items: center;
					width: 676rpx;
					height: 96rpx;
					background-image: url('https://lxnapi.ccttiot.com/bike/img/static/u5r7QJyFfPruTi4VsXzV');
					background-size: cover;
					/* 背景图片等比缩放以覆盖整个容器 */
					background-position: center;

					.txt1 {
						width: 50%;
						text-align: center;
						font-weight: 600;
						font-size: 40rpx;
						color: #3D3D3D;
					}

					.txt2 {
						width: 50%;
						text-align: center;
						font-weight: 600;
						font-size: 36rpx;
						color: #808080;
					}
				}

				.btn_li {
					display: flex;
					flex-wrap: nowrap;
					align-items: center;
					justify-content: center;
					margin-top: 20rpx;

					.btns {
						display: flex;
						align-items: center;
						justify-content: center;
						width: 238rpx;
						height: 80rpx;

						font-weight: 500;
						font-size: 36rpx;
						color: #6DB3FF;
						border-radius: 16rpx 16rpx 16rpx 16rpx;
						border: 2rpx solid #6DB3FF;
					}

					.btn {

						display: flex;
						align-items: center;
						justify-content: center;
						width: 406rpx;
						height: 80rpx;
						background: #6DB3FF;
						border-radius: 16rpx 16rpx 16rpx 16rpx;
						//
						margin-left: 14rpx;
						font-weight: 500;
						font-size: 36rpx;
						color: #FFFFFF;
						border: 2rpx solid #fff;
					}
				}

				.time_box {
					margin: 0 auto;
					padding: 22rpx 24rpx 28rpx 24rpx;
					display: flex;
					flex-wrap: nowrap;
					width: 658rpx;
					// height: 128rpx;
					background: #EEEEEE;
					border-radius: 20rpx 20rpx 20rpx 20rpx;

					.time_li {
						width: 50%;

						.txt {
							font-weight: 400;
							font-size: 24rpx;
							color: #808080;
						}

						.words {
							margin-top: 6rpx;
							font-weight: 600;
							font-size: 32rpx;
							color: #3D3D3D;

							image {
								width: 40rpx;
								height: 22rpx;
							}
						}
					}
				}

				.area_li {
					display: flex;
					flex-wrap: nowrap;
					align-items: flex-start;
					padding: 20rpx 46rpx 28rpx 46rpx;

					.dingw {
						display: flex;
						align-items: center;
						margin-left: 30rpx;
						margin-top: 46rpx;
						font-weight: 400;
						font-size: 28rpx;
						color: #808080;

						image {
							margin-left: 8rpx;
							width: 30rpx;
							height: 30rpx;
						}
					}

					.city {

						.txt {
							font-weight: 400;
							font-size: 24rpx;
							color: #808080;
						}

						.words {
							margin-top: 6rpx;
							font-weight: 600;
							font-size: 32rpx;
							color: #3D3D3D;

							image {
								width: 40rpx;
								height: 22rpx;
							}
						}
					}

					.area {
						margin-left: 20rpx;

						.top {
							display: flex;
							flex-wrap: nowrap;
							align-items: center;

							.txt {
								font-weight: 400;
								font-size: 24rpx;
								color: #808080;
							}

							.type {
								margin-left: 10rpx;
								background: #FFE9D4;
								border-radius: 4rpx 4rpx 4rpx 4rpx;
								padding: 2rpx 6rpx;
								font-weight: 400;
								font-size: 22rpx;
								color: #FF8C1E;
							}
						}

						.bot {
							margin-top: 6rpx;
							font-weight: 600;
							font-size: 32rpx;
							color: #3D3D3D;

							image {
								width: 40rpx;
								height: 22rpx;
							}
						}
					}
				}
			}


		}

	}
</style>