<template>
	<view class="page pageList">
		<navbar title="景点" leftClick @leftClick="$utils.navigateBack" />
		
		<view
		style="padding: 10rpx 30rpx;">
			<uv-search
			bgColor="#fff"
			@search="getData"
			:showAction="false"
			searchIconSize="30rpx"
			placeholder="请输入搜索关键字..." 
			v-model="queryParams.title"></uv-search>
		</view>
		
		<view class="">
			<screenRen
			@clickItem="clickItem"/>
		</view>
		
		<view class="list">
			<scenicSpotItem
			:key="index"
			v-for="(item, index) in list"
			:item="item"
			@click="$utils.navigateTo('/pages_order/scenicSpot/scenicSpotDetail?id=' + item.id)"
			/>
		</view>
		
	</view>
</template>

<script>
	import mixinsList from '@/mixins/list.js'
	import screenRen from '../components/screen/screenRen.vue'
	import scenicSpotItem from '../components/list/scenicSpot/scenicSpotItem.vue'
	export default {
		mixins: [mixinsList],
		components : {
			scenicSpotItem,
			screenRen,
		},
		data() {
			return {
				mixinsListApi : 'getScenicPage',
			}
		},
		methods: {
			clickItem(result){
				this.queryParams = {
					pageNo: 1,
					pageSize: 10,
				}
				result.forEach(n => {
					this.queryParams[n.name] = n.value
				})
				this.getData()
			},
		}
	}
</script>

<style scoped lang="scss">
.page{
	.list{
		padding: 0 20rpx;
	}
}
</style>
