<!-- 举报查询 -->
<template>
	<view class="search">
		<image src="http://111.198.10.15:11604/png/back_ts.png" style="position:absolute;top: 0;left: 0;z-index: -999; width:100%;height: 300rpx;"></image>
		<view class="search-area">
			<u-search
				placeholder="请输入关键字" 
				v-model="keyword"
				bgColor="#fff"
				height="40"
				:actionStyle="{
					fontSize: '16px',
					color: '#fff',
					fontWeight: '600'
				}"
				clearabled
				@custom="search"
				@search="search"
			></u-search>
		</view>
		
		<view class="record-area">
			<Record :list="recordList"/>
		</view>
		
		
		<!-- 加载更多 -->
		<u-loadmore :status="status" loadmoreText=" "/>
		
		<!-- 返回顶部 -->
		<u-back-top 
			:scroll-top="scrollTop" 
			icon="arrow-up" 
			duration="200"
		></u-back-top>
		
		<u-empty
			v-if="isEmpty"
			mode="search"
			text="暂无结果"
			:show="true"
			iconColor="#77797d"
			textColor="#77797d"
			marginTop="80"
		></u-empty>
	</view>
</template>

<script>
	import Record from '../components/record.vue'
	export default {
		name: 'Search',
		components: {
			Record
		},
		data() {
			return {
				isEmpty: false, //是否为空
				eventList: [], //事件数据
				keyword: '新疆', //搜索关键字
				scrollTop: 0,
				status: 'loadmore', //上滑加载状态 loading加载中，nomore没有更多了
			}
		},
		// 监听滚动条位置
		onPageScroll(e) {
			this.scrollTop = e.scrollTop;
		},
		//下拉刷新
		onPullDownRefresh() {
			//用this.keywords刷新
			console.log('refresh');
			setTimeout(function () {
				uni.stopPullDownRefresh();
			}, 1000);
		},
		//上滑加载
		onReachBottom() {
			
		},
		methods: {
			search() {
				
			}
		}
	}
</script>

<style lang="scss" scoped>
	.search {
		width: 100%;
		padding: 110rpx 0 80rpx 0;
		box-sizing: border-box;
		height: 100%;
		.search-area {
			position: fixed;
			box-sizing: border-box;
			top: 0;
			left: 0;
			padding: 20rpx 40rpx;
			width: 100%;
			height: 130rpx;
		}
	}
</style>
<style>
	page {
		background-color: #f0f0f0;
	}
</style>