<template>
	<view class="search-container">
		<uni-search-bar v-model="query.keyword"  placeholder="请填写预约姓名或者手机号码"   @confirm="onSearch" />
		<view class="res-list">
			<block v-for="(it,index) in dataList">
				<view class="item">				 
					<view class="no1">预约姓名：{{it.user.nickname}}</view>
					<view class="no1">手机号码：{{it.user.mobile}}</view>				 
					<view class="no1">预约编号：{{it.code}}</view>
					<view class="no1">预约时间：{{it.reqDate}}</view>				 
					<view class="no1">核销码：{{it.userTicket?it.userTicket.hxCode:""}}</view>				 
				</view> 
			</block> 
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return { 
				query:{
					page:1,
					pageSize:10,
					keyword:'',
					storeId:0,
				},
				dataList:[],
			};
		},
		onLoad(){
			this.onSearch();
		},
		methods:{
			onSearch(){
				let _this=this;
				let url="zc/searchUser";
				let data=_this.query;
				this.request({
					url,
					data,
				}).then(res => { 
					if (res.code == 200 ) {
						 _this.dataList=res.data.list;
					} 
				}).catch((err)=>{})
			}
		}
	}
</script>

<style lang="scss">
@import "./index.scss"
</style>
