You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
	
	
		
		
			
	
	
		
			
				
					
						
							|  |  |  | <template> | 
					
						
							|  |  |  | 	<view class="page-prebook-list"> | 
					
						
							|  |  |  | 		<visitor-list @prebookEvent="getBookData" ref="visitors"></visitor-list> | 
					
						
							|  |  |  | 		<pre-book-list class="preg-books" :dataList="bookList"></pre-book-list> | 
					
						
							|  |  |  | 	</view> | 
					
						
							|  |  |  | </template> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <script> | 
					
						
							|  |  |  | 	import preBookList from '@/components/preBookList.vue' | 
					
						
							|  |  |  | 	import visitorList from '@/components/visitorList.vue' | 
					
						
							|  |  |  | 	export default { | 
					
						
							|  |  |  | 		data() { | 
					
						
							|  |  |  | 			return { | 
					
						
							|  |  |  | 				bookList:[] | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		components:{ | 
					
						
							|  |  |  | 			preBookList, | 
					
						
							|  |  |  | 			visitorList | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		onShow() { | 
					
						
							|  |  |  | 			setTimeout(function(){ | 
					
						
							|  |  |  | 				this.pageInit() | 
					
						
							|  |  |  | 			}.bind(this)) | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		methods: { | 
					
						
							|  |  |  | 			getBookData(visitor_id) { | 
					
						
							|  |  |  | 				var param = new Object() | 
					
						
							|  |  |  | 				param.page = 1 | 
					
						
							|  |  |  | 				param.limit = 10000 | 
					
						
							|  |  |  | 				if(visitor_id >= 0){ | 
					
						
							|  |  |  | 					param.visitor_id = visitor_id | 
					
						
							|  |  |  | 				}else{ | 
					
						
							|  |  |  | 					param.visitor_id = '0' | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 				uni.showLoading({ | 
					
						
							|  |  |  | 					title:'加载中', | 
					
						
							|  |  |  | 					mask:true | 
					
						
							|  |  |  | 				}) | 
					
						
							|  |  |  | 				var timerobj = setTimeout(function(){ | 
					
						
							|  |  |  | 					uni.hideLoading() | 
					
						
							|  |  |  | 				}, 3000) | 
					
						
							|  |  |  | 				this.$http.req('api/user/get_appoints', param, 'POST', true).then(data=>{ | 
					
						
							|  |  |  | 					clearTimeout(timerobj) | 
					
						
							|  |  |  | 					uni.hideLoading() | 
					
						
							|  |  |  | 					if(data == -1) return | 
					
						
							|  |  |  | 					this.bookList = data; | 
					
						
							|  |  |  | 				}); | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 			pageInit() { | 
					
						
							|  |  |  | 				this.$refs.visitors.getVisitors() | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | </script> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <style lang="scss" scoped> | 
					
						
							|  |  |  | 	.page-prebook-list{ | 
					
						
							|  |  |  | 		width: 100%; | 
					
						
							|  |  |  | 		height: 100vh; | 
					
						
							|  |  |  | 		box-sizing: border-box; | 
					
						
							|  |  |  | 		overflow-y: auto; | 
					
						
							|  |  |  | 		background: #F8F8F8; | 
					
						
							|  |  |  | 		.preg-books{ | 
					
						
							|  |  |  | 			width: 714rpx; | 
					
						
							|  |  |  | 			margin: 0 auto; | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | </style> |