<template>
	<view class="movie">
		<anil-seat
		ref="anilSeat"
		  title="皮皮鲁与鲁西西之罐头小人"
		  info="2021年01月22日 国语 奇幻 喜剧 儿童"
		  room-name="5号厅"
		  :seat-data="seatData" 
		  :max="6" 
		  @confirm="onConfirmSeat">
		</anil-seat>
	</view>
</template>

<script>
	import {
		seatData
	} from '@/utils/seat-data.js'
	export default {
		data() {
			return {
				list:[]
			}
		},
		methods: {
			onConfirmSeat (items) {
			  console.log(items)
			  uni.navigateTo({
			  	url:`/pay/pay1`,
			  })
			}
		},
		onLoad() {
			for (let i= 15;i>0;i--) {
				for (let d = i;d>0;d--) {
					this.list.push(
					{
						"YCoord": i,
						"XCoord": d,
						"SeatCode": "4413141101#01#14"+i+d,
						"Status": 1,
						SeatName:`${d}排${i}座`,
						"RowNum": d,
						"ColumnNum": i,
						// "flag":1,
					  "Price": "23.6"
					}
					)
				}
			}
			console.log(1111,this.list);
			 // 座位图初始化 - seatData座位数据
			this.$refs['anilSeat'].initData(this.list)
		}
	}
</script>

<style lang="scss" scoped>
.movie{
	
}
</style>