<template>
	<view class='container'>
		<view class="sv-y">

			<scroll-view scroll-y>
				<view class="flex-column">

					<view class="flex-column mlr-24 mt-25 br-10 pad-20"
						style="color: #878787;background-color: #171717;">
						<view class="flex">
							<image class="wh-175" src="/static/logo.png"></image>
							<view class="flex-column fs-28 plr-20 flex-between" style="flex: 1;">
								<view class="flex">
									<text class="fs-32 flex-1" style="color: white;">花海LIVEHOUSE</text>
									<text class="fs-24 plr-24 ptb-10 br-30"
										style="color: #FE42C2;border: 1px solid #FE42C2;">查看位置</text>
								</view>
								<view class="flex">
									<view class="flex-column" style="flex: 1;">
										<view class="flex-column fs-24" style="color: #868686;">
											<text>周末低消3000起</text>
											<text>可容纳最多12人</text>
										</view>
										<view class="flex mt-10" style="color:#FFC100;justify-content: flex-end;">
											<text class="fs-46">￥500 </text>
										</view>
									</view>
								</view>
							</view>
						</view>
						<view class="flex fs-28 flex-between mt-30" style="color: #878787;">
							<text style="color: white;">预定日期</text>
							<text>2024-11-22 周五</text>
						</view>
						<view class="flex fs-28 flex-between mt-30 mb-20" style="color: #878787;">
							<text style="color: white;">场次信息</text>
							<text>22:00</text>
						</view>
					</view>


					<view class="flex-column mlr-24 mt-25 br-10 pad-20 fs-32"
						style="color: #878787;background-color: #171717;">
						<text style="color: white;">预订须知</text>
						<text class="fs-24 mt-25">1.支付成功之后将获得入场电子券
							2.参与购票后电子券直接生效，有效期从预约时间到次日早上8点
							3.未成年人禁止购票，购票后无法进入，门店概不负责
							4.多次下单不支付系统将判定您恶意下单，当日无法再下单
							5.如果您执行的是定卡操作，请注意您支付的为定卡押金
							6.最终解释权由本司所有</text>
					</view>

					<view class="flex-column mlr-24 mt-25 br-10 pad-20 fs-32"
						style="color: #878787;background-color: #171717;">
						<text style="color: white;">预订信息</text>
						<view class="flex fs-28 flex-between mt-30 mb-20" style="color: #878787;">
							<text style="color: white;">姓名</text>
							<text>旅行的小七仔</text>
						</view>
						<view class="flex fs-28 flex-between mt-30 mb-20" style="color: #878787;">
							<text style="color: white;">电话</text>
							<text>17737898789</text>
						</view>
						<view class="flex fs-28 flex-between mt-30 mb-20" style="color: #878787;">
							<text style="color: white;">人数</text>
							<view>
								<input placeholder="请输入" v-model="number" style="text-align: right;" />
							</view>

						</view>
						<view @click="birthdaySow=true" class="flex fs-28 flex-between mt-30 mb-20"
							style="color: #878787;">
							<text style="color: white;">预计到店时间</text>
							<text>{{time==''?'请选择':time}}</text>
						</view>
						<view class="flex fs-28 flex-between mt-30 mb-20" style="color: #878787;">
							<text style="color: white;">主题</text>
							<view>
								<input placeholder="请输入" v-model="number" style="text-align: right;" />
							</view>
						</view>
						<view class="flex fs-28  mt-30 mb-20" style="color: #878787;">
							<text style="color: white;flex: 1;">备注</text>
							<view>
								<input placeholder="请输入" v-model="number" style="text-align: right;" />

							</view>
						</view>
					</view>
					<view class="flex mlr-24 mt-25 br-10 plr-20 ptb-20 fs-32 flex-between"
						style="color: #878787;background-color: #171717;align-items: center;">
						<text style="color: white;">应付定金</text>
						<text class="fs-42" style="color: #FD46B9;">￥500</text>
					</view>
				</view>

			</scroll-view>
			<!-- 生日选择 -->
			<u-datetime-picker :show="birthdaySow" v-model="value" mode="datetime" @confirm="onBirthday"
				@cancel="birthdaySow=false" @close="birthdaySow=false" :maxDate="currentTimestamp"></u-datetime-picker>
		</view>
		<view class="h-100 mtb-30 mlr-24">
			<view @click="onSubmit" class="fullscreen-btn" style="background-color: #FE42C2;">
				<text>立即支付</text>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				birthdaySow: false,
				value: Number(new Date()),
				time: '',
				number: '',
				timeIndex: 0,

			};
		},
		onLoad() {
			this.getTimestamp()
		},
		methods: {
			getTimestamp() {
				const currentDate = new Date(); // 创建一个表示当前时间的Date对象
				this.currentTimestamp = currentDate.getTime(); // 获取当前时间的时间戳并赋值给变量
				console.log(currentDate.getTime())
			},
			onBirthday(e) {
				this.birthdaySow = false;
				this.time = this.$wskj.timeFormat(e.value, 'yyyy-mm-dd hh:MM')
				this.$emit('onBirthday', this.time)

			},
			onSubmit() {
				this.$wskj.to('pages/zfjg')
			}

		},
	};
</script>

<style scoped>
	.container {
		width: 100%;
		height: 100%;
		background: #0F0F0F;
		background-color: ;
		display: flex;
		flex-direction: column;
	}

	.good-hot {
		margin: 25rpx;
		height: 160rpx;
	}

	/* 注意点，测试下来，设置水平滑动也要给一个固定高度 */
	.scroll-view_H {
		margin-top: 30rpx;
		width: 100%;
		white-space: nowrap;
		height: 100rpx;
		flex-direction: row;
	}

	.scroll-view_H view {
		display: inline-block;
		width: 120rpx;
		height: 100rpx;
		border-radius: 10rpx;
	}

	/* 去掉最后一个元素的 margin-right: 16rpx 设置为0 */
	/* .scroll-view_H view:last-child {
		margin-right: 0;
	} */

	.scroll-view_H .fl-item-sel {
		display: flex;
		height: 100%;
		width: 100rpx;
		flex-direction: column;
		background: #FE42C2;
		border-radius: 20rpx;
		justify-content: center;
		align-items: center;
		color: #FFFFFF;
	}

	.scroll-view_H .fl-item {
		display: flex;
		height: 100%;
		width: 100rpx;
		flex-direction: column;
		border-radius: 20rpx;
		justify-content: center;
		align-items: center;
		color: #878787;
	}

	.sv-y {
		flex: 1;
		/* 自动占满剩余的空间 */
		overflow-y: auto;
		/* 允许纵向滚动 */
	}

	.btn-box {
		width: 90%;
		position: fixed;
		bottom: 100rpx;
		left: 50%;
		margin-left: -45%;
	}
</style>