<template>
	<view class="content">
		<!-- 背景图 -->
		<view class="index_bg">
			<view class="welcome"><image class="welcome_img" src="../../static/index/welcome.png"></image></view>
		</view>
		<!-- 第一层标题 -->
		<view class="touming_bg">
			<view class="touming_title">墨轩湖姬子公寓（南昌交通学院）</view>
			<view class="touming_txt">尊敬的老师，您辛苦了，欢迎入住！</view>
		</view>
		<!-- 第二层表单 -->
		<view class="two_item">
			<view class="two_all">
				<view class="select-time" @click="openCalendar">
					<view class="select-time-one">
					  <text class="select-list">周四入住</text>
					  <text class="select-list-time">07月21日</text>
					</view>
					<view class="select-center">
						<view class="select-line1"></view>
						<view class="select-circle">1晚</view>
						<view class="select-line2"></view>
					</view>
					<view class="select-time-one">
					  <text class="select-list">周五离店</text>
					  <text class="select-list-time">07月22日</text>
					</view>
					<uni-calendar ref="calendar" class="uni-calendar--hook" :clear-date="true" :date="info.date" :insert="info.insert" :lunar="info.lunar" :startDate="info.startDate"
					:endDate="info.endDate" :range="info.range" @confirm="confirm" @close="close"/>
				</view>
				<view class="form_bg">
					<view class="form_title">01户型</view>
					<!-- 自定义表单 -->
					<view class="form-name">李希</view>
					<view class="form-line"></view>
					<view class="form-phone">13548790024</view>
					<view class="form-line" style="margin-top: 389rpx;"></view>
					<view class="uni-list-cell">
						<view class="uni-list-cell-left">
							当前选择
						</view>
						<view class="uni-list-cell-db">
							<picker @change="bindPickerChange" :value="index" :range="array">
								<view class="uni-input">{{array[index]}}</view>
							</picker>
						</view>
					</view>
				</view>
			</view>
			<button style="margin-bottom: 0rpx;" type="primary" @click="submit('customForm')">提交</button>
		</view>
		
		<!-- 第三层订房 -->
		<view class="room-list">
			<!-- 房型列表 -->
			<!-- <view class="room-kuang">
				<view class="room-xinxi" v-for="(item,index) in room" :key="index">
					<image class="room-image" src="../../static/index/room_image.svg"></image>
					<view class="room-name">{{item.name}}</view>
					<view class="room-mark">{{item.mark1}} {{item.mark2}} {{item.mark3}}</view>
					<view class="room-icon">
						<image src="../../static/index/index_wifi.svg" style="width: 22rpx;height: 22rpx;"></image>
						<image src="../../static/index/index_kongtiao.svg" style="width: 20rpx;height: 20rpx;margin-left: 10rpx;"></image>
						<image src="../../static/index/index_nosmoking.svg" style="width: 22rpx;height: 22rpx;margin-left: 10rpx;"></image>
						<image src="../../static/index/index_lock.svg" style="width: 23rpx;height: 23rpx;margin-left: 10rpx;"></image>
					</view>
					<view class="before-price"><strike>{{item.before_price}}</strike></view>
					<view class="room-price">{{item.price}}</view>
					<view class="room-button" @click="navigateToOrderRoom"><text>订</text></view>
					<view class="room-line"  v-if="index<(room.length-1)"></view>
				</view>
			</view> -->
			
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				showCalendar: false,
				info: {
					lunar: true,
					range: true,
					insert: false
				},
				array: ['18:00前到店', '19:00前到店', '20:00前到店', '21:00前到店'],
				index: 0,
			}
		},
		onLoad() {
			
		},
		methods: {
			openCalendar() {
				this.$refs.calendar.open()
			},
			close(){
				console.log('弹窗关闭');
			},
			confirm(e) {
				console.log('confirm 返回:', e)
			},
			//选择器
			bindPickerChange: function(e) {
				// console.log('picker发送选择改变，携带值为', e.detail.value)
				this.index = e.detail.value
			},
		}
	}
</script>

<style>
	@import url("./css/order_room.css");
</style>
